diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-11-23 10:59:52 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-11-24 08:47:00 +1000 |
commit | 4f3e670fd28fceec384ff0d4ca7c1ff8d7a872ad (patch) | |
tree | 78df0381e0b3a2cbfa40100b825afa53625b383e /dix/eventconvert.c | |
parent | 6f12934d4ea52f17ac7b21e92f4f929db165f83d (diff) |
dix: when comparing axis modes, compare the bits, not the bytes.
The DeviceEvent's mode field is a set of bits for each valuator, not bytes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'dix/eventconvert.c')
-rw-r--r-- | dix/eventconvert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/eventconvert.c b/dix/eventconvert.c index 46eb4ffd8..b92169ee3 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -327,7 +327,7 @@ countValuators(DeviceEvent *ev, int *first) /* Assume mode of 0th valuator matches XI1 device mode. Stop when the * event mode changes since XI1 can't handle mixed mode devices. */ - if (ev->valuators.mode[i] != ev->valuators.mode[0]) + if (BitIsOn(ev->valuators.mode, i) != BitIsOn(ev->valuators.mode, 0)) break; if (BitIsOn(ev->valuators.mask, i)) |