-
Peter Hutterer authored
Unlike the already-existing thumb detection, a touch may be labelled palm at any time, not just during the initial touch down. This requires full integration into the tap state machine to unwind properly. For most states, a palm detection simply ignores the finger and reverts to the most recent state. One exception is the case of two fingers down, one finger up followed by the remaining finger detected as a palm finger. This triggers a single-finger tap but with timestamps that may be from the wrong finger. Since we're within a short tap timeout anyway this should not matter too much. The special state PALM_UP is only handled in one condition (DEAD). Once a touch is a palm we basically skip over it from then on. If we end up in the DEAD state after a button press we still need to handle the palm up events accordingly to be able to return to IDLE. That transition also requires us to have an accurate count of the real fingers down (palms don't count) so we need a separate nfingers_down counter for tapping. https://bugs.freedesktop.org/show_bug.cgi?id=103210 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
46eab975