summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-02-11 01:29:26 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-02-14 21:47:30 +1000
commit6f28388187cffae9e5bc9bfc9425acff4f478b59 (patch)
treeb84685e6d64ed71c86ded0be2d73c19450d8d268
parentceb026c6a6f1eea8b34e745f06f1ebcd652c0ba1 (diff)
dix: reset last.scroll when resetting the valuator (#45611)
last.scroll remained on the last-submitted scrolling value but last.valuator was changed whenever the slave device changed. The first scrolling delta after a switch was then calculated as (last.scroll - new abs value), causing erroneous scrolling events. Test case: - synaptics with a scrolling method enabled, other device with 3+ axes (e.g. wacom) - scroll on touchpad - use other device - scroll on touchpad The second scroll caused erroneous button press/release events. X.Org Bug 45611 <http://bugs.freedesktop.org/show_bug.cgi?id=45611> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--dix/getevents.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index 7678aa1f2..6ea4ba010 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -360,6 +360,7 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev)
if (i >= lastSlave->valuator->numAxes)
{
pDev->last.valuators[i] = 0;
+ valuator_mask_set_double(pDev->last.scroll, i, 0);
}
else
{
@@ -367,6 +368,7 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev)
val = rescaleValuatorAxis(val, lastSlave->valuator->axes + i,
pDev->valuator->axes + i, 0, 0);
pDev->last.valuators[i] = val;
+ valuator_mask_set_double(pDev->last.scroll, i, val);
}
}
}