touchpad: rm dead tp_palm_tap_is_palm
authorTobias Bengfort <tobias.bengfort@posteo.de>
Fri, 17 Mar 2023 10:55:49 +0000 (11:55 +0100)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 23 Mar 2023 00:22:25 +0000 (00:22 +0000)
This was added in 39f11253471500cd380c8977b8cbe0683abe6b1d
(https://bugs.freedesktop.org/show_bug.cgi?id=89625)

Later, a more sophisticated palm detection was implemented in
46eab97538af18381243f5337bf3d29e4b21098f
(https://bugs.freedesktop.org/show_bug.cgi?id=103210)

The only place where `tp_palm_tap_is_palm()` is called is if the more
sophisticated palm detection has already decided that this is not a palm,
so it should never return true.

Signed-off-by: Tobias Bengfort <tobias.bengfort@posteo.de>
src/evdev-mt-touchpad-tap.c
src/evdev-mt-touchpad.c
src/evdev-mt-touchpad.h

index 42d91297f97d19f94d376ad73fba2967eb34e63d..299cd554c71786b27c835834241fd1dba2ceab06 100644 (file)
@@ -1261,14 +1261,6 @@ tp_tap_handle_state(struct tp_dispatch *tp, uint64_t time)
                        t->tap.initial = t->point;
                        tp->tap.nfingers_down++;
                        tp_tap_handle_event(tp, t, TAP_EVENT_TOUCH, time);
-
-                       /* If we think this is a palm, pretend there's a
-                        * motion event which will prevent tap clicks
-                        * without requiring extra states in the FSM.
-                        */
-                       if (tp_palm_tap_is_palm(tp, t))
-                               tp_tap_handle_event(tp, t, TAP_EVENT_MOTION, time);
-
                } else if (t->state == TOUCH_END) {
                        if (t->was_down) {
                                assert(tp->tap.nfingers_down >= 1);
index a72b9095899b5c2b86afd6c2b3e556deeb6257f4..b29a5c56799a5818d4882f9f86c519f9ff95026b 100644 (file)
@@ -882,21 +882,6 @@ tp_palm_in_edge(const struct tp_dispatch *tp, const struct tp_touch *t)
        return tp_palm_in_side_edge(tp, t) || tp_palm_in_top_edge(tp, t);
 }
 
-bool
-tp_palm_tap_is_palm(const struct tp_dispatch *tp, const struct tp_touch *t)
-{
-       if (t->state != TOUCH_BEGIN)
-               return false;
-
-       if (!tp_palm_in_edge(tp, t))
-               return false;
-
-       evdev_log_debug(tp->device,
-                       "palm: touch %d: palm-tap detected\n",
-                       t->index);
-       return true;
-}
-
 static bool
 tp_palm_detect_dwt_triggered(struct tp_dispatch *tp,
                             struct tp_touch *t,
@@ -1099,13 +1084,6 @@ tp_palm_detect_edge(struct tp_dispatch *tp,
        if (t->state != TOUCH_BEGIN || !tp_palm_in_edge(tp, t))
                return false;
 
-       /* don't detect palm in software button areas, it's
-          likely that legitimate touches start in the area
-          covered by the exclusion zone */
-       if (tp->buttons.is_clickpad &&
-           tp_button_is_inside_softbutton_area(tp, t))
-               return false;
-
        if (tp_touch_get_edge(tp, t) & EDGE_RIGHT)
                return false;
 
index c99b190f4bb226d2253cbf4ba6851c87cad898cd..bd5eab5f270f24688f982ea141389979ccb81374 100644 (file)
@@ -731,9 +731,6 @@ tp_gesture_stop_twofinger_scroll(struct tp_dispatch *tp, uint64_t time);
 void
 tp_gesture_tap_timeout(struct tp_dispatch *tp, uint64_t time);
 
-bool
-tp_palm_tap_is_palm(const struct tp_dispatch *tp, const struct tp_touch *t);
-
 void
 tp_clickpad_middlebutton_apply_config(struct evdev_device *device);