touchpad: revamp thumb detection
authorMatt Mayfield <mdmayfield@users.noreply.github.com>
Fri, 21 Jun 2019 03:19:22 +0000 (13:19 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 16 Jul 2019 23:33:14 +0000 (09:33 +1000)
commit4536b5b38faea0e43168f2349dd4c13b6489ff6e
tree40ebc5d4434c9d4ca114ee8cb08febb18230cdc4
parentdda6f733af4960b15233909afff77a9f22ad92c5
touchpad: revamp thumb detection

Instead of a simple yes/no/maybe for thumbs, have a more extensive state
machine that keeps track of the thumb. Since we only support one thumb anyway,
the tracking moves to the tp_dispatch struct.

Test case changes:
touchpad_clickfinger_3fg_tool_position:
  with better thumb detection we can now handle this properly and expect a
  right button (2fg) press for the test case
touchpad_thumb_no_doublethumb_with_timeout:
  two thumbs are now always two fingers, so let's switch to axis events here

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-mt-touchpad-gestures.c
src/evdev-mt-touchpad-tap.c
src/evdev-mt-touchpad-thumb.c
src/evdev-mt-touchpad.c
src/evdev-mt-touchpad.h
test/litest.c
test/litest.h
test/test-touchpad-buttons.c
test/test-touchpad.c