diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-06-15 14:13:26 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-06-26 18:43:59 +1000 |
commit | be7da7f7daa3b551bb9418b62bc5490ddcfa21e7 (patch) | |
tree | 972b7c823d18e91e07d175d3f3c818fb90671585 /src | |
parent | 96b885c29a34081654617bdc6d4af6c41ada6e4a (diff) |
touchpad: ignore the tap motion threshold if fingers > slots
Do so on the synaptics serial touchpads at least, they're known to cause
cursor jumps when the third finger is down. Not detecting a tap move means
three-finger taps get more reliable on these touchpads.
This change affects gestures who now effectively have to wait for the tap
timeout to happen. It's a trade-off.
https://bugs.freedesktop.org/show_bug.cgi?id=101435
https://bugzilla.redhat.com/show_bug.cgi?id=1455443
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev-mt-touchpad-tap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c index 5a237fe..3ab3316 100644 --- a/src/evdev-mt-touchpad-tap.c +++ b/src/evdev-mt-touchpad-tap.c @@ -768,6 +768,18 @@ tp_tap_exceeds_motion_threshold(struct tp_dispatch *tp, struct phys_coords mm = tp_phys_delta(tp, device_delta(t->point, t->tap.initial)); + /* if we have more fingers down than slots, we know that synaptics + * touchpads are likely to give us pointer jumps. + * This triggers the movement threshold, making three-finger taps + * less reliable (#101435) + */ + if (tp->device->model_flags & EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD && + (tp->nfingers_down > 2 || tp->old_nfingers_down > 2) && + (tp->nfingers_down > tp->num_slots || + tp->old_nfingers_down > tp->num_slots)) { + return false; + } + return length_in_mm(mm) > DEFAULT_TAP_MOVE_THRESHOLD; } |