From 86057a774026055c2c7ab29cd2617e224447154d Mon Sep 17 00:00:00 2001 From: satrmb <10471-satrmb_true-email-is-private_contact-via-web@gitlab.freedesktop.org> Date: Sun, 9 Aug 2020 15:28:45 +0200 Subject: [PATCH] touchpad: disable speed-based thumb detection if hold-and-tap is enabled New touches arriving while other touches are moving fast could be taps, not just thumbs. Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org> --- src/evdev-mt-touchpad-thumb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/evdev-mt-touchpad-thumb.c b/src/evdev-mt-touchpad-thumb.c index ceb123ef..43209703 100644 --- a/src/evdev-mt-touchpad-thumb.c +++ b/src/evdev-mt-touchpad-thumb.c @@ -321,13 +321,14 @@ tp_thumb_update_multifinger(struct tp_dispatch *tp) mm = evdev_device_unit_delta_to_mm(tp->device, &distance); /* Speed-based thumb detection: if an existing finger is moving, and - * a new touch arrives, mark it as a thumb if it doesn't qualify as a - * 2-finger scroll. Also account for a thumb dropping onto the touchpad - * while scrolling or swiping. + * a new touch arrives, and hold-and-tap is disabled, mark it as a thumb + * if it doesn't qualify as a 2-finger scroll. Also account for a thumb + * dropping onto the touchpad while scrolling or swiping. */ if (newest && tp->thumb.state == THUMB_STATE_FINGER && tp->nfingers_down >= 2 && + !tp->tap.hold_tap_enabled && speed_exceeded_count > 5 && (tp->scroll.method != LIBINPUT_CONFIG_SCROLL_2FG || (mm.x > SCROLL_MM_X || mm.y > SCROLL_MM_Y))) {