diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-15 20:00:41 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-18 10:17:08 +0930 |
commit | d21155a3e9b51df946766926bc6155c8972c4439 (patch) | |
tree | e0273dd5288f36aedeacd5a4ebfb9116e5080902 /xkb | |
parent | 2b9c829bdebd16910bdf48b9d64862e3d34f5b7f (diff) |
input: fix up usage of button->down, used to be a bitmask, is now an array.
device->button->down used to be a 32-byte bitmask with one bit for each
button. This has changed into a 256-byte array, with one byte assigned for
each button. Some of the callers were still using this array as a bitmask
however, this is fixed with this patch.
Thanks to Keith Packard for pointing this out. See also:
http://lists.freedesktop.org/archives/xorg/2008-June/036202.html
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkbActions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 41b4e4c8e..8a2682562 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -1045,7 +1045,7 @@ int button; switch (pAction->type) { case XkbSA_LockDeviceBtn: if ((pAction->devbtn.flags&XkbSA_LockNoLock)|| - (dev->button->down[button/8]&(1L<<(button%8)))) + (dev->button->down[button])) return 0; XkbDDXFakeDeviceButton(dev,True,button); filter->upAction.type= XkbSA_NoAction; @@ -1077,7 +1077,7 @@ int button; switch (filter->upAction.type) { case XkbSA_LockDeviceBtn: if ((filter->upAction.devbtn.flags&XkbSA_LockNoUnlock)|| - ((dev->button->down[button/8]&(1L<<(button%8)))==0)) + ((dev->button->down[button])==0)) return 0; XkbDDXFakeDeviceButton(dev,False,button); break; |