summaryrefslogtreecommitdiff
path: root/xkb/xkbActions.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-11-26 11:15:05 +1000
committerPeter Hutterer <peter.hutterer@redhat.com>2008-12-02 15:50:37 +1000
commita85f0d6b98237d8a196de624207acf1983a1859a (patch)
tree1429f3b39123b17d4622f8f8f50c17e590088663 /xkb/xkbActions.c
parent180bad84774493d48f2793a6281d825560944863 (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>
Diffstat (limited to 'xkb/xkbActions.c')
-rw-r--r--xkb/xkbActions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index a2606297a..c268795b7 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;