summaryrefslogtreecommitdiffstats
path: root/src/glx/dri2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri2.c')
-rw-r--r--src/glx/dri2.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/glx/dri2.c b/src/glx/dri2.c
index 30999c899a7..adfd3d1f7c8 100644
--- a/src/glx/dri2.c
+++ b/src/glx/dri2.c
@@ -98,16 +98,13 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
{
GLXBufferSwapComplete *aevent = (GLXBufferSwapComplete *)event;
xDRI2BufferSwapComplete *awire = (xDRI2BufferSwapComplete *)wire;
- __GLXDRIdrawable *pdraw;
- struct glx_display *glx_dpy = __glXInitialize(dpy);
/* Ignore swap events if we're not looking for them */
- pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, awire->drawable);
- if (!pdraw || !(pdraw->eventMask & GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK))
- return False;
+ aevent->type = dri2GetSwapEventType(dpy, awire->drawable);
+ if(!aevent->type)
+ return False;
aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
- aevent->type = glx_dpy->codes->first_event + GLX_BufferSwapComplete;
aevent->send_event = (awire->type & 0x80) != 0;
aevent->display = dpy;
aevent->drawable = awire->drawable;