Commit 6b59b427 authored by Peter Hutterer's avatar Peter Hutterer

touchpad: drop distance threshold to detect pinches

This gives us too many false positives of 2fg scroll being detected as pinch
gesture. Reporter in [1] uses index+ring finger and thus exceeds the distance
easily (that's admittedly a special case).

This is worsed by the lack of a client stack that handles the gestures. User's
don't see that they're inadvertently performing a gesture, they just see 2fg
scroll not working.

Drop the distance for now, once we have a ubiquitous client stack we can
revisit and bring it back.

[1] Peter Hutterer's avatarPeter Hutterer <>
Reviewed-by: default avatarHans de Goede <>
parent 0d40aefe
......@@ -264,26 +264,11 @@ tp_gesture_twofinger_handle_state_none(struct tp_dispatch *tp, uint64_t time)
static enum tp_gesture_2fg_state
tp_gesture_twofinger_handle_state_unknown(struct tp_dispatch *tp, uint64_t time)
struct normalized_coords normalized;
struct device_float_coords delta;
struct tp_touch *first = tp->gesture.touches[0],
*second = tp->gesture.touches[1];
int dir1, dir2;
delta = device_delta(first->point, second->point);
normalized = tp_normalize_delta(tp, delta);
/* If fingers are further than 3 cm apart assume pinch */
if (normalized_length(normalized) > TP_MM_TO_DPI_NORMALIZED(30)) {
tp->gesture.prev_scale = 1.0;
/* Elif fingers have been close together for a while, scroll */
/* if fingers stay unmoving for a while, assume (slow) scroll */
if (time > (tp->gesture.initial_time + DEFAULT_GESTURE_2FG_SCROLL_TIMEOUT)) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment