[PATCH] Handle XGE events with the "send event" flag

carlosg at gnome.org carlosg at gnome.org
Fri Nov 26 15:01:23 PST 2010


From: Carlos Garnacho <carlosg at gnome.org>

Now that GenericEvents may be sent with the 0x80 flag set, make
xcb handle these correctly, reading the payload of GenericEvents
even if the flag is set.

Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
---
 src/xcb_in.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/xcb_in.c b/src/xcb_in.c
index 57d7e01..e9e967b 100644
--- a/src/xcb_in.c
+++ b/src/xcb_in.c
@@ -154,7 +154,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 +
-- 
1.7.3.2



More information about the xorg-devel mailing list