[PATCH 1/2 libinput] touchpad: remove the code for disabling hysteresis

Konstantin Kharlamov Hi-Angel at yandex.ru
Sun Feb 18 10:09:23 UTC 2018


Signed-off-by: Konstantin Kharlamov <Hi-Angel at yandex.ru>
---
 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 3ae1da29..ead76456 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -131,22 +131,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)
@@ -1544,9 +1528,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);
@@ -2936,7 +2917,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.15.1



More information about the wayland-devel mailing list