From 3750ebd540510324ef5ada769537ae05309adadb Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Mon, 19 Jul 2010 09:37:07 -0400 Subject: glx: Fix drawable lookup in DRI2 event handler DRI2 events are sent to the X drawable ID used to create the DRI2 drawable, not the GLX drawable ID. So when an event comes in, we need to look up the __GLXDRIdrawable by its X drawable ID, which needs a new hash table. --- src/glx/dri2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/glx/dri2.c') diff --git a/src/glx/dri2.c b/src/glx/dri2.c index dbf3420892..ab530baf0f 100644 --- a/src/glx/dri2.c +++ b/src/glx/dri2.c @@ -99,9 +99,10 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire) { GLXBufferSwapComplete *aevent = (GLXBufferSwapComplete *)event; xDRI2BufferSwapComplete *awire = (xDRI2BufferSwapComplete *)wire; - __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, awire->drawable, NULL); + __GLXDRIdrawable *pdraw; /* Ignore swap events if we're not looking for them */ + pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, awire->drawable); if (!(pdraw->eventMask & GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK)) return False; -- cgit v1.2.3