[Xcb] [PATCH] Don't set full sequence for ge events

Daniel Martin consume.noise at gmail.com
Fri Feb 22 00:08:24 PST 2013


XGE events can be larger than 32bytes. In that case the
'full_sequence' field at the 32byte boundary would overwrite event data.

Signed-off-by: Daniel Martin <consume.noise at gmail.com>
---
In theory, this is an ABI change, in practice no one (no xml
implementation in xcb/proto) used those XGE events before.

 src/xcb.h    | 1 -
 src/xcb_in.c | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xcb.h b/src/xcb.h
index f7dc6af..6fc3be2 100644
--- a/src/xcb.h
+++ b/src/xcb.h
@@ -151,7 +151,6 @@ typedef struct {
     uint16_t event_type;
     uint16_t pad1;
     uint32_t pad[5];         /**< Padding */
-    uint32_t full_sequence;  /**< full sequence */
 } xcb_ge_event_t;
 
 /**
diff --git a/src/xcb_in.c b/src/xcb_in.c
index b810783..1c730f9 100644
--- a/src/xcb_in.c
+++ b/src/xcb_in.c
@@ -199,7 +199,8 @@ static int read_packet(xcb_connection_t *c)
         return 1;
     }
 
-    if(genrep.response_type != XCB_REPLY)
+    if( genrep.response_type != XCB_REPLY &&
+       (genrep.response_type & 0x7f) != XCB_XGE_EVENT)
         ((xcb_generic_event_t *) buf)->full_sequence = c->in.request_read;
 
     /* reply, or checked error */
-- 
1.8.1.4



More information about the Xcb mailing list