diff options
author | Tobias Bengfort <tobias.bengfort@posteo.de> | 2023-03-17 11:55:49 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2023-03-23 00:22:25 +0000 |
commit | ec0041f116ea63fd842dc45b4c9c1ba419a4ba7c (patch) | |
tree | d22b9b5cb70a081c5ab596d47974a563985cd732 | |
parent | 9422d72f97cef778ce464f957c8edd3d53d93d72 (diff) | |
download | libinput-ec0041f116ea63fd842dc45b4c9c1ba419a4ba7c.tar.gz |
touchpad: rm dead tp_palm_tap_is_palm
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>
-rw-r--r-- | src/evdev-mt-touchpad-tap.c | 8 | ||||
-rw-r--r-- | src/evdev-mt-touchpad.c | 22 | ||||
-rw-r--r-- | src/evdev-mt-touchpad.h | 3 |
3 files changed, 0 insertions, 33 deletions
diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c index 42d91297..299cd554 100644 --- a/src/evdev-mt-touchpad-tap.c +++ b/src/evdev-mt-touchpad-tap.c @@ -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); diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index a72b9095..b29a5c56 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -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; diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h index c99b190f..bd5eab5f 100644 --- a/src/evdev-mt-touchpad.h +++ b/src/evdev-mt-touchpad.h @@ -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); |