touchpad: stricter thumb detection if no pressure/size
authorMatt Mayfield <mdmayfield@users.noreply.github.com>
Thu, 11 Jul 2019 15:14:37 +0000 (10:14 -0500)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 16 Jul 2019 23:33:14 +0000 (09:33 +1000)
src/evdev-mt-touchpad-thumb.c

index e62c78c84c76f1ba4a2a7759569aedc021bf4185..eb20616a80d14a3a622e90f9cbc44bb9f1dbef75 100644 (file)
@@ -113,10 +113,12 @@ tp_thumb_detect_pressure_size(const struct tp_dispatch *tp,
 static bool
 tp_thumb_needs_jail(const struct tp_dispatch *tp, const struct tp_touch *t)
 {
-       if (t->point.y < tp->thumb.upper_thumb_line)
+       if (t->point.y < tp->thumb.upper_thumb_line ||
+           tp->scroll.method == LIBINPUT_CONFIG_SCROLL_EDGE)
                return false;
 
        if (!tp_thumb_in_exclusion_area(tp, t) &&
+           (tp->thumb.use_size || tp->thumb.use_pressure) &&
            !tp_thumb_detect_pressure_size(tp, t))
                return false;