summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Thum <simon.thum@gmx.de>2010-11-19 11:09:21 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-11-24 08:47:00 +1000
commitebe3ddaf284ad388835da9cbaa6ad61fa21ce6dd (patch)
treeee18214a2dc6354a4febbbc01de7149b63a1207a
parentd435e1ecb86e2fe6292b5945262956644f979bbb (diff)
dix: fix up valuators passed to acceleration code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--dix/getevents.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index a288e36d7..06a0da014 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1159,11 +1159,16 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
* should be converted to masked valuators. */
int vals[2];
vals[0] = valuator_mask_isset(&mask, 0) ?
- valuator_mask_get(&mask, 0) : pDev->last.valuators[0];
+ valuator_mask_get(&mask, 0) : 0;
vals[1] = valuator_mask_isset(&mask, 1) ?
- valuator_mask_get(&mask, 1) : pDev->last.valuators[1];
+ valuator_mask_get(&mask, 1) : 0;
accelPointer(pDev, 0, 2, vals, ms);
+ if (valuator_mask_isset(&mask, 0))
+ valuator_mask_set(&mask, 0, vals[0]);
+ if (valuator_mask_isset(&mask, 1))
+ valuator_mask_set(&mask, 1, vals[1]);
+
/* The pointer acceleration code modifies the fractional part
* in-place, so we need to extract this information first */
x_frac = pDev->last.remainder[0];