summaryrefslogtreecommitdiff
path: root/Xi/queryst.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 /Xi/queryst.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 'Xi/queryst.c')
-rw-r--r--Xi/queryst.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Xi/queryst.c b/Xi/queryst.c
index 268bdd78b..21de843f3 100644
--- a/Xi/queryst.c
+++ b/Xi/queryst.c
@@ -139,8 +139,7 @@ ProcXQueryDeviceState(ClientPtr client)
tb->class = ButtonClass;
tb->length = sizeof(xButtonState);
tb->num_buttons = b->numButtons;
- for (i = 0; i < MAP_LENGTH; i++)
- SetBitIf(tb->buttons, b->down, i);
+ memcpy(tb->buttons, b->down, sizeof(b->down));
buf += sizeof(xButtonState);
}