[PATCH 2/6] dix: when comparing axis modes, compare the bits, not the bytes.
Peter Hutterer
peter.hutterer at who-t.net
Mon Nov 22 19:35:41 PST 2010
The DeviceEvent's mode field is a set of bits for each valuator, not bytes.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/eventconvert.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index 46eb4ff..b92169e 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))
--
1.7.3.2
More information about the xorg-devel
mailing list