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 11 additions, 5 deletionssrc/evdev-mt-touchpad-gestures.c
- src/evdev-mt-touchpad-tap.c 1 addition, 1 deletionsrc/evdev-mt-touchpad-tap.c
- src/evdev-mt-touchpad-thumb.c 223 additions, 107 deletionssrc/evdev-mt-touchpad-thumb.c
- src/evdev-mt-touchpad.c 11 additions, 9 deletionssrc/evdev-mt-touchpad.c
- src/evdev-mt-touchpad.h 19 additions, 15 deletionssrc/evdev-mt-touchpad.h
- test/litest.c 0 additions, 6 deletionstest/litest.c
- test/litest.h 0 additions, 3 deletionstest/litest.h
- test/test-touchpad-buttons.c 2 additions, 2 deletionstest/test-touchpad-buttons.c
- test/test-touchpad.c 27 additions, 137 deletionstest/test-touchpad.c