mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-09 14:30:17 +01:00
tablet: Clear pressure axis when tool loses contact with the tablet
Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
8f9730872d
commit
563268fa9f
1 changed files with 6 additions and 1 deletions
|
|
@ -343,7 +343,12 @@ sanitize_tablet_axes(struct tablet_dispatch *tablet)
|
|||
tablet->axes[LIBINPUT_TABLET_AXIS_DISTANCE] = 0;
|
||||
} else if (bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_AXIS_PRESSURE) &&
|
||||
!tablet_has_status(tablet, TABLET_STYLUS_IN_CONTACT)) {
|
||||
clear_bit(tablet->changed_axes, LIBINPUT_TABLET_AXIS_PRESSURE);
|
||||
/* Make sure that the last axis value sent to the caller is a 0 */
|
||||
if (tablet->axes[LIBINPUT_TABLET_AXIS_PRESSURE] == 0)
|
||||
clear_bit(tablet->changed_axes,
|
||||
LIBINPUT_TABLET_AXIS_PRESSURE);
|
||||
else
|
||||
tablet->axes[LIBINPUT_TABLET_AXIS_PRESSURE] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue