aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/eventconvert.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-26 15:22:07 +0000
committermarha <marha@users.sourceforge.net>2010-11-26 15:22:07 +0000
commit57818d0fe4f7cf94279909f03ec11b326b284f1e (patch)
tree88487618bf9c63429ea49574b110854ff8ca28b9 /xorg-server/dix/eventconvert.c
parent6fda93be42ace9eeab0e82ceebb6798961c9105c (diff)
downloadvcxsrv-57818d0fe4f7cf94279909f03ec11b326b284f1e.tar.gz
vcxsrv-57818d0fe4f7cf94279909f03ec11b326b284f1e.tar.bz2
vcxsrv-57818d0fe4f7cf94279909f03ec11b326b284f1e.zip
libXext xserver libfontenc libX11 libxcb pixman git update 26 11 2010
Diffstat (limited to 'xorg-server/dix/eventconvert.c')
-rw-r--r--xorg-server/dix/eventconvert.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/xorg-server/dix/eventconvert.c b/xorg-server/dix/eventconvert.c
index e45878a90..e9297149c 100644
--- a/xorg-server/dix/eventconvert.c
+++ b/xorg-server/dix/eventconvert.c
@@ -324,14 +324,16 @@ countValuators(DeviceEvent *ev, int *first)
for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++)
{
- /* 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])
- break;
-
if (BitIsOn(ev->valuators.mask, i))
{
+ /* Assume mode of first_valuator matches XI1 device mode. Stop when the
+ * event mode changes since XI1 can't handle mixed mode devices.
+ */
+ if (first_valuator > -1 &&
+ BitIsOn(ev->valuators.mode, i) !=
+ BitIsOn(ev->valuators.mode, first_valuator))
+ break;
+
if (first_valuator == -1)
first_valuator = i;
last_valuator = i;