[PATCH 3/3] Handle GenericEvents with the "send event" flag set
carlosg at gnome.org
carlosg at gnome.org
Fri Nov 26 14:59:29 PST 2010
From: Carlos Garnacho <carlosg at gnome.org>
GenericEvents might potentially have the 0x80 flag now, so
deliver these correctly.
Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
---
src/XlibInt.c | 2 +-
src/xcb_io.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/XlibInt.c b/src/XlibInt.c
index e094e7d..6f1ebae 100644
--- a/src/XlibInt.c
+++ b/src/XlibInt.c
@@ -759,7 +759,7 @@ struct stored_event {
Bool
_XIsEventCookie(Display *dpy, XEvent *ev)
{
- return (ev->xcookie.type == GenericEvent &&
+ return ((ev->xcookie.type & 0x7f) == GenericEvent &&
dpy->generic_event_vec[ev->xcookie.extension & 0x7F] != NULL);
}
diff --git a/src/xcb_io.c b/src/xcb_io.c
index 7e685de..be05e08 100644
--- a/src/xcb_io.c
+++ b/src/xcb_io.c
@@ -272,7 +272,7 @@ static void handle_response(Display *dpy, xcb_generic_reply_t *response, Bool in
* xcb_generic_event_t struct uses 4 bytes for internal
* numbering, so we need to shift the trailing data to
* be after the first 32 bytes. */
- if(response->response_type == GenericEvent && ((xcb_ge_event_t *) response)->length)
+ if((response->response_type & 0x7f) == GenericEvent && ((xcb_ge_event_t *) response)->length)
{
xcb_ge_event_t *event = (xcb_ge_event_t *) response;
memmove(&event->full_sequence, &event[1], event->length * 4);
--
1.7.3.2
More information about the xorg-devel
mailing list