mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 05:50:04 +01:00
dix: only transform valuators when we need them.
Unconditionally drop the valuators back into the mask when they were there
in the first place. Otherwise, sending identical coordinates from the driver
on a translated device causes the valuator mask to be alternatively
overwritten with the translated value or left as-is. This leads to the
device jumping around between the translated and the original position.
The same could be achieved with a valuator_mask_unset() combination.
Testcase:
xsetwacom set "device name" MapToOutput VGA1
Then press a button on the device, cursor jumps between the two positions.
Introduced in 31737fff08
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
8dea7ac25a
commit
02d77caa36
1 changed files with 3 additions and 2 deletions
|
|
@ -1075,9 +1075,10 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
|
|||
|
||||
pixman_f_transform_point(&dev->transform, &p);
|
||||
|
||||
if (lround(p.v[0]) != dev->last.valuators[0])
|
||||
if (valuator_mask_isset(mask, 0))
|
||||
valuator_mask_set(mask, 0, lround(p.v[0]));
|
||||
if (lround(p.v[1]) != dev->last.valuators[1])
|
||||
|
||||
if (valuator_mask_isset(mask, 1))
|
||||
valuator_mask_set(mask, 1, lround(p.v[1]));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue