libinput/0002-touchpad-remove-the-code-for-disabling-hysteresis.patch

64 lines
2.0 KiB
Diff

From 5f4d975861ace89b47b6d7e265d38103045c1cc6 Mon Sep 17 00:00:00 2001
From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Date: Sun, 18 Feb 2018 13:09:23 +0300
Subject: [PATCH libinput 2/3] touchpad: remove the code for disabling
hysteresis
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
(cherry picked from commit e8dffbd73a1b3c17716f972f210e420de94028c2)
---
src/evdev-mt-touchpad.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index a024be28..9f36fcbe 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -135,22 +135,6 @@ tp_motion_history_push(struct tp_touch *t)
t->history.index = motion_index;
}
-static inline void
-tp_maybe_disable_hysteresis(struct tp_dispatch *tp, uint64_t time)
-{
- /* If the finger is down for 80ms without seeing motion events,
- the firmware filters and we don't need a software hysteresis */
- if (tp->nfingers_down >= 1 &&
- time - tp->hysteresis.last_motion_time > ms2us(80)) {
- tp->hysteresis.enabled = false;
- evdev_log_debug(tp->device, "hysteresis disabled\n");
- return;
- }
-
- if (tp->queued & TOUCHPAD_EVENT_MOTION)
- tp->hysteresis.last_motion_time = time;
-}
-
static inline void
tp_motion_hysteresis(struct tp_dispatch *tp,
struct tp_touch *t)
@@ -1550,9 +1534,6 @@ static void
tp_handle_state(struct tp_dispatch *tp,
uint64_t time)
{
- if (tp->hysteresis.enabled)
- tp_maybe_disable_hysteresis(tp, time);
-
tp_process_state(tp, time);
tp_post_events(tp, time);
tp_post_process_state(tp, time);
@@ -2942,7 +2923,7 @@ tp_init_hysteresis(struct tp_dispatch *tp)
res_y = tp->device->abs.absinfo_y->resolution;
tp->hysteresis.margin.x = res_x/2;
tp->hysteresis.margin.y = res_y/2;
- tp->hysteresis.enabled = true;
+ tp->hysteresis.enabled = false;
}
static void
--
2.14.3