summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2015-07-31 11:32:58 -0400
committerAdam Jackson <[email protected]>2015-08-18 09:39:46 -0400
commit8f7ebcb6fad53ea6d2f80fc5b7a046db07690032 (patch)
tree2e1a17b98fcd42064850b6714f93d16fbca7d05a /src
parent97f5d00648046a711b7806c3a47b28543c084f0e (diff)
glx: Fix __glXWireToEvent for BufferSwapComplete
In the DRI2 path this event is magically synthesized from the corresponding DRI2 event, but with Present, the server sends us the event itself. The DRI2 path fills in the serial number, send_event, and display fields of the XEvent struct that the app sees, but the Present path did not. This is likely related to a class of crashes seen in gtk/clutter apps: https://bugzilla.redhat.com/attachment.cgi?id=1032631 Note that the crashing instruction is looking up the lock_fns slot in the Display *, and %rdi (holding the Display *) is 0x1. Cc: [email protected] Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glx/glxext.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index fdc24d439c1..dc87fb9e16c 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -138,6 +138,9 @@ __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
if (!glxDraw)
return False;
+ aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
+ aevent->send_event = (awire->type & 0x80) != 0;
+ aevent->display = dpy;
aevent->event_type = awire->event_type;
aevent->drawable = glxDraw->xDrawable;
aevent->ust = ((CARD64)awire->ust_hi << 32) | awire->ust_lo;