diff options
author | Alex Plotnick <shrike@netaxs.com> | 2012-02-29 11:59:51 -0500 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2012-03-08 16:22:28 +0100 |
commit | 9206f73599512f2243c19ab21856863b246d867b (patch) | |
tree | 62e5bd4c9f9c06c9a3b36cba24b7905b0745d15e | |
parent | 82ca763a10ccaeb1300089b4e5beea23910a0b29 (diff) |
Only use the low-order 7 bits of the type code in determining event types.
Signed-off-by: Julien Danjou <julien@danjou.info>
-rw-r--r-- | src/event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event.c b/src/event.c index 73acf1f..2ab7eac 100644 --- a/src/event.c +++ b/src/event.c @@ -10,7 +10,7 @@ PyObject * xpybEvent_create(xpybConn *conn, xcb_generic_event_t *e) { - unsigned char opcode = e->response_type; + unsigned char opcode = e->response_type & 0x7f; PyObject *shim, *event, *type = (PyObject *)&xpybEvent_type; if (opcode < conn->events_len && conn->events[opcode] != NULL) |