touchpad: disable tapping for fingers exceeding the timeout/motion threshold
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 20 Jun 2014 04:16:13 +0000 (14:16 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 1 Jul 2014 22:12:37 +0000 (08:12 +1000)
commit8fa5d0bf51083756e1a7ead11afae490a09542ab
tree2a5e8434f6d5b8326801149c08b837d77d74e222
parent14ad471ff5797ca5a77a377aeaad07833af63144
touchpad: disable tapping for fingers exceeding the timeout/motion threshold

The current code triggers multi-finger tapping even if the finger released was
previously held on the touchpad for a while. For an event sequence of:
1. first finger down
2. first finger move past threshold/wait past timeout
3. second finger down
4. first finger up

The second finger initiates the two-finger tap state, but the button event is
sent when the first finger releases - despite that finger not meeting the
usual tap constraints. This sequence can happen whenever a user swaps fingers.

Add the finger state to the actual touchpoints and update them whenever the
constrains are broken. Then, discard button events if the respective touch
did not meet the conditions.

http://bugs.freedesktop.org/76760

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
doc/touchpad-tap-state-machine.svg
src/evdev-mt-touchpad-tap.c
src/evdev-mt-touchpad.h
test/touchpad.c