summaryrefslogtreecommitdiff
path: root/src/glx/dri2.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-07-19 09:37:07 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-07-19 09:37:38 -0400
commit3750ebd540510324ef5ada769537ae05309adadb (patch)
tree7c132086ed4e029a9f552ad100db6248f51e089b /src/glx/dri2.c
parent4eaf591d1504f61e131f77f01711d27a75d02e90 (diff)
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.
Diffstat (limited to 'src/glx/dri2.c')
-rw-r--r--src/glx/dri2.c3
1 files changed, 2 insertions, 1 deletions
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;