summaryrefslogtreecommitdiff
path: root/XI2.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-13 14:37:13 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-13 14:37:22 +1000
commitf345258bf44e018e04643ccc6f02f5e40267d78c (patch)
treefa0fa9ccbcc194d5355d740ea9db19e707129887 /XI2.h
parent6280b53cdbb750ef2363f5b55346a4271678ddef (diff)
Fix XIMaskLen macro.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'XI2.h')
-rw-r--r--XI2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/XI2.h b/XI2.h
index 06bc740..6323204 100644
--- a/XI2.h
+++ b/XI2.h
@@ -112,7 +112,7 @@
#define XISetMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] |= (1 << ((event) & 7)))
#define XIClearMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] &= ~(1 << ((event) & 7)))
#define XIMaskIsSet(ptr, event) (((unsigned char*)(ptr))[(event)>>3] & (1 << ((event) & 7)))
-#define XIMaskLen(event) ((event >> 3))
+#define XIMaskLen(event) (((event + 7) >> 3))
/* Fake device ID's for event selection */
#define XIAllDevices 0