mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 18:40:05 +01:00
gestures: jump straight to swipe for 3+ finger gestures on ST touchpads
The first/second variables are only needed for pinch, so we can skip them here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
05bec98681
commit
6ad303b3d3
1 changed files with 8 additions and 2 deletions
|
|
@ -240,6 +240,13 @@ tp_gesture_handle_state_none(struct tp_dispatch *tp, uint64_t time)
|
||||||
if (ntouches < 2)
|
if (ntouches < 2)
|
||||||
return GESTURE_STATE_NONE;
|
return GESTURE_STATE_NONE;
|
||||||
|
|
||||||
|
if (!tp->gesture.enabled) {
|
||||||
|
if (ntouches == 2)
|
||||||
|
return GESTURE_STATE_SCROLL;
|
||||||
|
else
|
||||||
|
return GESTURE_STATE_SWIPE;
|
||||||
|
}
|
||||||
|
|
||||||
first = touches[0];
|
first = touches[0];
|
||||||
second = touches[1];
|
second = touches[1];
|
||||||
|
|
||||||
|
|
@ -271,8 +278,7 @@ tp_gesture_handle_state_none(struct tp_dispatch *tp, uint64_t time)
|
||||||
if (first == second)
|
if (first == second)
|
||||||
return GESTURE_STATE_NONE;
|
return GESTURE_STATE_NONE;
|
||||||
|
|
||||||
} else if (!tp->gesture.enabled)
|
}
|
||||||
return GESTURE_STATE_SCROLL;
|
|
||||||
|
|
||||||
tp->gesture.initial_time = time;
|
tp->gesture.initial_time = time;
|
||||||
first->gesture.initial = first->point;
|
first->gesture.initial = first->point;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue