Hi, On 06/30/2014 02:22 AM, Peter Hutterer wrote: > 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 <[email protected]> > --- > Hans pointed out that there was a missing state transition for some touches, > so here's v2. The main change here is that whenever one finger exceeds the > motion threshold, all taps are marked dead: > From the tp_tap_handle_state hunk: > > + /* Any touch exceeding the threshold turns all > + * touches into DEAD */ > + tp_for_each_touch(tp, tmp) { > + if (tmp->tap.state == TAP_TOUCH_STATE_TOUCH) > + tmp->tap.state = TAP_TOUCH_STATE_DEAD; > + } > > This doesn't have any real effect as the main state diagram won't send > events in the affected branches but it's more correct this way. > > Other changes to v1: > - simplified the state diagram to use "any finger" bubbles where it applies > to all three fingers > - added one more test to check for a finger motion not to allow tapping on > another finger (touchpad_no_first_fg_tap_after_move) > - fixed tests to be called for all touchpads, not just apple ones.
Looks good: Reviewed-by: Hans de Goede <[email protected]> Regards, Hans _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
