[PATCH libinput] gestures: jump straight to swipe for 3+ finger gestures on ST touchpads
Hans de Goede
hdegoede at redhat.com
Mon Jan 25 08:42:02 PST 2016
Hi,
On 25-01-16 04:03, Peter Hutterer wrote:
> The first/second variables are only needed for pinch, so we can skip them
> here.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Regards,
Hans
> ---
> src/evdev-mt-touchpad-gestures.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
> index 5aa256f..8fe0bb8 100644
> --- a/src/evdev-mt-touchpad-gestures.c
> +++ b/src/evdev-mt-touchpad-gestures.c
> @@ -240,6 +240,13 @@ tp_gesture_handle_state_none(struct tp_dispatch *tp, uint64_t time)
> if (ntouches < 2)
> return GESTURE_STATE_NONE;
>
> + if (!tp->gesture.enabled) {
> + if (ntouches == 2)
> + return GESTURE_STATE_SCROLL;
> + else
> + return GESTURE_STATE_SWIPE;
> + }
> +
> first = touches[0];
> second = touches[1];
>
> @@ -271,8 +278,7 @@ tp_gesture_handle_state_none(struct tp_dispatch *tp, uint64_t time)
> if (first == second)
> return GESTURE_STATE_NONE;
>
> - } else if (!tp->gesture.enabled)
> - return GESTURE_STATE_SCROLL;
> + }
>
> tp->gesture.initial_time = time;
> first->gesture.initial = first->point;
>
More information about the wayland-devel
mailing list