summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/event.c2
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)