summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-10-22 14:01:11 +1000
committerChase Douglas <chase.douglas@ubuntu.com>2010-11-05 10:42:17 -0400
commit6b89fd1320ca0ab4926534a4057e65237f6578c5 (patch)
treefe0b414d027e616e3ef6ddd5518307393292e435
parent1f0a75dd65b34e6c526cb2bc7ef474aa066dcf4b (diff)
dix: populate motion history only if the mode matches the first axis.
XI1 doesn't cater for mixed mode devices, so bail out on the first valuator that has a different mode. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--dix/getevents.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index 1d41fb7d9..bbad692d1 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -378,8 +378,7 @@ AllocateMotionHistory(DeviceIntPtr pDev)
int numAxes;
/* XI1 doesn't understand mixed mode devices */
for (numAxes = 0; numAxes < v->numAxes; numAxes++)
- if ((v->axes[numAxes].mode & DeviceMode) !=
- (v->mode & DeviceMode))
+ if (valuator_get_mode(pDev, numAxes) != valuator_get_mode(pDev, 0))
break;
size = sizeof(INT32) * numAxes;
}
@@ -564,8 +563,7 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, ValuatorMask *mask,
for (i = 0; i < v->numAxes; i++)
{
/* XI1 doesn't support mixed mode devices */
- if ((pDev->valuator->axes[i].mode & DeviceMode) !=
- (pDev->valuator->mode & DeviceMode))
+ if (valuator_get_mode(pDev, i) != valuator_get_mode(pDev, 0))
break;
if (valuator_mask_size(mask) <= i || !valuator_mask_isset(mask, i))
{