mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-03 11:30:24 +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>
This commit is contained in:
parent
60c8b07695
commit
3cb60130c1
1 changed files with 5 additions and 2 deletions
|
|
@ -957,8 +957,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