mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-29 04:20:08 +01:00
touchpad: on a non-clickpad, reset the motion history on nfingers change
The only reason to have more than one finger on a non-clickpad is to tap,
scroll or gesture. In all cases resetting the motion history is a good idea to
avoid jumps moving from 2 to 1 finger.
https://bugs.freedesktop.org/show_bug.cgi?id=97194
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
(cherry picked from commit 3cb60130c1)
This commit is contained in:
parent
865fc1fa65
commit
cb7cef6f4b
1 changed files with 5 additions and 2 deletions
|
|
@ -955,8 +955,11 @@ tp_need_motion_history_reset(struct tp_dispatch *tp)
|
|||
{
|
||||
bool rc = false;
|
||||
|
||||
/* semi-mt finger postions may "jump" when nfingers changes */
|
||||
if (tp->semi_mt && tp->nfingers_down != tp->old_nfingers_down)
|
||||
/* Semi-mt finger postions may "jump" when nfingers changes. And on
|
||||
* a non-clickpad the only reason to have more than one finger down
|
||||
* is scrolling/gesture, so a reset just makes things sane again */
|
||||
if ((tp->semi_mt || !tp->buttons.is_clickpad) &&
|
||||
tp->nfingers_down != tp->old_nfingers_down)
|
||||
return true;
|
||||
|
||||
/* if we're transitioning between slots and fake touches in either
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue