diff options
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/glxext.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 94582f6b2e8..68c359e6e2c 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -134,14 +134,15 @@ __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire) GLXBufferSwapComplete *aevent = (GLXBufferSwapComplete *)event; xGLXBufferSwapComplete2 *awire = (xGLXBufferSwapComplete2 *)wire; struct glx_drawable *glxDraw = GetGLXDrawable(dpy, awire->drawable); - aevent->event_type = awire->event_type; - aevent->drawable = awire->drawable; - aevent->ust = ((CARD64)awire->ust_hi << 32) | awire->ust_lo; - aevent->msc = ((CARD64)awire->msc_hi << 32) | awire->msc_lo; if (!glxDraw) return False; + aevent->event_type = awire->event_type; + aevent->drawable = glxDraw->xDrawable; + aevent->ust = ((CARD64)awire->ust_hi << 32) | awire->ust_lo; + aevent->msc = ((CARD64)awire->msc_hi << 32) | awire->msc_lo; + if (awire->sbc < glxDraw->lastEventSbc) glxDraw->eventSbcWrap += 0x100000000; glxDraw->lastEventSbc = awire->sbc; |