touchpad: restore thumb detection while keeping fixes from !292
authorMatt Mayfield <mdmayfield@users.noreply.github.com>
Sat, 4 Apr 2020 17:56:21 +0000 (12:56 -0500)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 22 May 2020 02:16:05 +0000 (02:16 +0000)
commit73870d938e822c0b7cfa8b1b1b9aa213abe6bd81
treed70652b7fa536441af14c4bec62d1e76bb70e87c
parent4ff6d6e3171713f5168a5dc9ca02702a46797bcb
touchpad: restore thumb detection while keeping fixes from !292

!292 improved libinput's ability to detect multiple-finger clicks when
the fingers were not aligned close to horizontally. However that caused
thumb detection to fail in several use cases.

This patch restores thumb detection for
- 2+ finger physical clickpad presses
- resting thumb while two-finger scrolling
- touches in the thumb exclusion area during multi-finger taps
and improves pinch detection when thumb is centered below fingers.

It also further enhances the flexibility of finger position for 2-, 3-,
or 4-finger taps: if all tapping fingers land on the touchpad within a
short time (currently 100ms), they will all count regardless of
position (unless below the lower_thumb_line).

Signed-off-by: Matt Mayfield <mdmayfield@yahoo.com>
src/evdev-mt-touchpad-gestures.c
src/evdev-mt-touchpad-thumb.c
src/evdev-mt-touchpad.c
src/evdev-mt-touchpad.h