mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-03-06 03:30:43 +01:00
Don't report old relative values in getValuatorEvents
Relative valuator values should not be reported in any future events. If
a relative valuator value is not set in an internal event, set the value
to 0 for XI 1.x valuator events sent over the wire.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit f40103cee1)
This commit is contained in:
parent
f1a8f8afc7
commit
89142b356b
1 changed files with 3 additions and 1 deletions
|
|
@ -384,8 +384,10 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv)
|
|||
for (j = 0; j < xv->num_valuators; j++) {
|
||||
if (BitIsOn(ev->valuators.mask, xv->first_valuator + j))
|
||||
valuators[j] = ev->valuators.data[xv->first_valuator + j];
|
||||
else
|
||||
else if (dev->valuator->axes[xv->first_valuator + j].mode == Absolute)
|
||||
valuators[j] = dev->valuator->axisVal[xv->first_valuator + j];
|
||||
else
|
||||
valuators[j] = 0;
|
||||
}
|
||||
|
||||
if (i + 6 < num_valuators)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue