[PATCH 04/28] Input: Reset SD remainder when copying co-ords from MD
Daniel Stone
daniel at fooishbar.org
Thu Jun 9 10:17:12 PDT 2011
In updateSlaveDeviceCoords, pDev->last.valuators was being copied from
the master, but pDev->last.remainder wasn't. Make sure we copy both, to
avoid minor inconsistencies.
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/getevents.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dix/getevents.c b/dix/getevents.c
index c935c97..d610577 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -320,6 +320,8 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev)
* position of the pointer */
pDev->last.valuators[0] = master->last.valuators[0];
pDev->last.valuators[1] = master->last.valuators[1];
+ pDev->last.remainder[0] = master->last.remainder[0];
+ pDev->last.remainder[1] = master->last.remainder[1];
if (!pDev->valuator)
return;
@@ -339,14 +341,19 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev)
if ((lastSlave = master->last.slave) && lastSlave->valuator) {
for (i = 2; i < pDev->valuator->numAxes; i++) {
if (i >= lastSlave->valuator->numAxes)
+ {
pDev->last.valuators[i] = 0;
+ pDev->last.remainder[i] = 0;
+ }
else
+ {
pDev->last.valuators[i] =
rescaleValuatorAxis(pDev->last.valuators[i],
pDev->last.remainder[i],
&pDev->last.remainder[i],
lastSlave->valuator->axes + i,
pDev->valuator->axes + i, 0);
+ }
}
}
--
1.7.5.3
More information about the xorg-devel
mailing list