summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/evdev-mt-touchpad-gestures.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index e4e465a6..a910bec4 100644
--- a/src/evdev-mt-touchpad-gestures.c
+++ b/src/evdev-mt-touchpad-gestures.c
@@ -182,12 +182,15 @@ tp_gesture_get_active_touches(const struct tp_dispatch *tp,
}
static int
-tp_gesture_get_direction(struct tp_dispatch *tp, struct tp_touch *touch)
+tp_gesture_get_direction(struct tp_dispatch *tp, struct tp_touch *touch,
+ unsigned int nfingers)
{
struct normalized_coords normalized;
struct device_float_coords delta;
double move_threshold = TP_MM_TO_DPI_NORMALIZED(1);
+ move_threshold *= (nfingers - 1);
+
delta = device_delta(touch->point, touch->gesture.initial);
normalized = tp_normalize_delta(tp, delta);
@@ -347,8 +350,8 @@ tp_gesture_handle_state_unknown(struct tp_dispatch *tp, uint64_t time)
}
/* Else wait for both fingers to have moved */
- dir1 = tp_gesture_get_direction(tp, first);
- dir2 = tp_gesture_get_direction(tp, second);
+ dir1 = tp_gesture_get_direction(tp, first, tp->gesture.finger_count);
+ dir2 = tp_gesture_get_direction(tp, second, tp->gesture.finger_count);
if (dir1 == UNDEFINED_DIRECTION || dir2 == UNDEFINED_DIRECTION)
return GESTURE_STATE_UNKNOWN;