Handle XGE events with the "send event" flag
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 5 Oct 2010 16:03:22 +0000 (18:03 +0200)
committerJamey Sharp <jamey@minilop.net>
Tue, 12 Apr 2011 19:57:37 +0000 (12:57 -0700)
This patch is necessary so xcb reads the payload after the message
for GenericEvents with the 0x80 flag turned on.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Signed-off-by: Jamey Sharp <jamey@minilop.net>
src/xcb_in.c

index ca75169..501e719 100644 (file)
@@ -171,7 +171,7 @@ static int read_packet(xcb_connection_t *c)
     }
 
     /* XGE events may have sizes > 32 */
-    if (genrep.response_type == XCB_XGE_EVENT)
+    if ((genrep.response_type & 0x7f) == XCB_XGE_EVENT)
         eventlength = genrep.length * 4;
 
     buf = malloc(length + eventlength +