[PATCH] dix: fix up valuators passed to acceleration code.
Peter Hutterer
peter.hutterer at who-t.net
Thu Nov 18 17:09:21 PST 2010
From: Simon Thum <simon.thum at gmx.de>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
Simon, this is essentially your patch with the extra if () addded.
dix/getevents.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dix/getevents.c b/dix/getevents.c
index 9553728..7af9326 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1155,11 +1155,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];
--
More information about the xorg-devel
mailing list