summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-11-26 11:15:05 +1000
committerKeith Packard <keithp@keithp.com>2009-01-30 17:11:44 -0800
commitebb3872925315d705e47e1ccd7f193ac90ac33dc (patch)
tree9af96c47c63b8a5cf57511643c103eb13a4d1bb8 /xkb
parent50d80c25525a691472e3fc5859fb303a3ffe1ef2 (diff)
Xi: fix use of button->down - bitflags instead of int arrays.
The device's button down state array was changed to use DOWN_LENGTH and thus bitflags for each button in cfcb3da7. Update the DBSN events to copy this bit-wise state. Update xkb and Xi to check for the bit flag instead of the array value. Reported by ajax. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> (cherry picked from commit a85f0d6b98237d8a196de624207acf1983a1859a)
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkbActions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 94420cf68..64e17e9ac 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -1043,7 +1043,7 @@ int button;
switch (pAction->type) {
case XkbSA_LockDeviceBtn:
if ((pAction->devbtn.flags&XkbSA_LockNoLock)||
- (dev->button->down[button]))
+ BitIsOn(dev->button->down, button))
return 0;
XkbDDXFakeDeviceButton(dev,True,button);
filter->upAction.type= XkbSA_NoAction;
@@ -1075,7 +1075,7 @@ int button;
switch (filter->upAction.type) {
case XkbSA_LockDeviceBtn:
if ((filter->upAction.devbtn.flags&XkbSA_LockNoUnlock)||
- ((dev->button->down[button])==0))
+ BitIsOn(dev->button->down, button))
return 0;
XkbDDXFakeDeviceButton(dev,False,button);
break;