Commit fc7b8d79 authored by Peter Hutterer's avatar Peter Hutterer

touchpad: correct the tap state transitions for a palm on TOUCH_BEGIN

Where a touch is labelled as palm on TOUCH_BEGIN (edge palms) we would still
feed the touch through the tap state machine. This would trigger the PALM
transition for each state, usually reducing the touch count.

When the touches were later released, the touch count was out of sync,
resulting in an error message. In the case of #488, the trigger was
a single evdev frame with three fingers down, the third of which was an edge
- touch 1 transitions from IDLE to TOUCH
- touch 2 transitions from TOUCH to TOUCH_2
- touch 3 (the palm) transitioned from TOUCH_2 back to TOUCH

That third transition is invalid, the palm hasn't been seen by the tap state
machine so it should just be ignored.

Fix this by moving making the tap state processing conditional on a touch
state other than TOUCH_BEGIN.

Fixes #488Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
parent 6e9477a8
Pipeline #155706 passed with stages
in 16 minutes and 19 seconds