diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-13 14:37:13 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-13 14:37:22 +1000 |
commit | f345258bf44e018e04643ccc6f02f5e40267d78c (patch) | |
tree | fa0fa9ccbcc194d5355d740ea9db19e707129887 /XI2.h | |
parent | 6280b53cdbb750ef2363f5b55346a4271678ddef (diff) |
Fix XIMaskLen macro.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'XI2.h')
-rw-r--r-- | XI2.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |