[PATCH v2 libinput 3/3] touchpad: disable tapping for fingers exceeding the timeout/motion threshold
Hans de Goede
hdegoede at redhat.com
Tue Jul 1 04:44:45 PDT 2014
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 <peter.hutterer at who-t.net>
> ---
> 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 <hdegoede at redhat.com>
Regards,
Hans
More information about the wayland-devel
mailing list