diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-08-04 15:23:43 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-08-19 10:45:07 +1000 |
commit | 3cb60130c182cb4bbfa8f908218fb12e84866cd5 (patch) | |
tree | 5821913b426345181f933a25820f3caa58135cce | |
parent | 60c8b0769501d9fa19c0494d2c335c3519ff50c9 (diff) |
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>
-rw-r--r-- | src/evdev-mt-touchpad.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 6cebfa3..3baed09 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -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 |