Hi,
On 20-12-16 04:57, Peter Hutterer wrote:
If the fingers rest on the touchpad without moving for a timeout, switch to
pinch or swipe based on the finger position. We already did so for two-fingers
switching to scrolling, now we also do so for 3 and 4 finger gestures. This
gives us better reaction to small movements.
Signed-off-by: Peter Hutterer <[email protected]>
---
src/evdev-mt-touchpad-gestures.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index 6c568a3..e54db2a 100644
--- a/src/evdev-mt-touchpad-gestures.c
+++ b/src/evdev-mt-touchpad-gestures.c
@@ -331,10 +331,10 @@ tp_gesture_handle_state_unknown(struct tp_dispatch *tp,
uint64_t time)
int yres = tp->device->abs.absinfo_y->resolution;
int vert_distance;
- /* for two-finger gestures, if the fingers stay unmoving for a
- * while, assume (slow) scroll */
- if (tp->gesture.finger_count == 2) {
- if (time > (tp->gesture.initial_time +
DEFAULT_GESTURE_2FG_SCROLL_TIMEOUT)) {
+ if (time > (tp->gesture.initial_time +
DEFAULT_GESTURE_2FG_SCROLL_TIMEOUT)) {
+ /* for two-finger gestures, if the fingers stay unmoving for a
+ * while, assume (slow) scroll */
+ if (tp->gesture.finger_count == 2) {
tp_gesture_set_scroll_buildup(tp);
return GESTURE_STATE_SCROLL;
}
@@ -346,6 +346,8 @@ tp_gesture_handle_state_unknown(struct tp_dispatch *tp,
uint64_t time)
tp->gesture.enabled) {
tp_gesture_init_pinch(tp);
return GESTURE_STATE_PINCH;
+ } else {
+ return GESTURE_STATE_SWIPE;
}
}
This change means that if 2 fingers are down and one finger is > 20mm below the
others, we
will no longer immediately switch to pinch mode, as that test is now only done
after the
timeout. I think that that is an unintended side-effect of this patch ?
Regards,
Hans
_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel