mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 03:30:05 +01:00
tablet: drop pressure when either pressure or distance changed
Keep pressure and distance mutually exclusive regardless which one of the two updates. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
d749170450
commit
319fb38ded
1 changed files with 3 additions and 1 deletions
|
|
@ -853,7 +853,9 @@ sanitize_tablet_axes(struct tablet_dispatch *tablet)
|
|||
pressure = libevdev_get_abs_info(tablet->device->evdev, ABS_PRESSURE);
|
||||
|
||||
/* Keep distance and pressure mutually exclusive */
|
||||
if (bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE) &&
|
||||
if (distance &&
|
||||
(bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE) ||
|
||||
bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE)) &&
|
||||
distance->value > distance->minimum &&
|
||||
pressure->value > pressure->minimum) {
|
||||
clear_bit(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue