[PATCH libinput 4/4] touchpad: re-enable hysteresis by default for all devices

Peter Hutterer peter.hutterer at who-t.net
Fri Jun 17 03:17:41 UTC 2016


The removal of the hysteresis even on precise touchpads has led to
difficulties controlling the cursor in a few instances. Since 27078b2667d
we only have the hysteresis on Apple touchpads and the Lenovo *40 series and
later. Even on those do we see some positioning difficulties (bug 94379).

So restore the hysteresis by default again for all touchpads. In the future a
knob could be exposed for precision vs reactivity or something, but for now
the drawback of imprecise positioning does not outweigh the benefits we get
on those few devices.

https://bugs.freedesktop.org/show_bug.cgi?id=94379

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-mt-touchpad.c                      | 6 ------
 src/evdev.c                                  | 1 -
 src/evdev.h                                  | 1 -
 test/litest-device-synaptics-x1-carbon-3rd.c | 1 -
 udev/90-libinput-model-quirks.hwdb           | 2 --
 5 files changed, 11 deletions(-)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index eb3c4dd..96e78b9 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -2118,12 +2118,6 @@ tp_init_hysteresis(struct tp_dispatch *tp)
 {
 	int res_x, res_y;
 
-	tp->hysteresis_margin.x = 0;
-	tp->hysteresis_margin.y = 0;
-
-	if (tp->device->model_flags & EVDEV_MODEL_PRECISE_TOUCHPAD)
-		return;
-
 	res_x = tp->device->abs.absinfo_x->resolution;
 	res_y = tp->device->abs.absinfo_y->resolution;
 	tp->hysteresis_margin.x = res_x/2;
diff --git a/src/evdev.c b/src/evdev.c
index e18492a..13e3578 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1804,7 +1804,6 @@ evdev_read_model_flags(struct evdev_device *device)
 		MODEL(CYBORG_RAT),
 		MODEL(CYAPA),
 		MODEL(LENOVO_T450_TOUCHPAD),
-		MODEL(PRECISE_TOUCHPAD),
 		MODEL(TRACKBALL),
 		{ NULL, EVDEV_MODEL_DEFAULT },
 #undef MODEL
diff --git a/src/evdev.h b/src/evdev.h
index 99e3b73..eae9ba9 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -114,7 +114,6 @@ enum evdev_device_model {
 	EVDEV_MODEL_CYBORG_RAT = (1 << 14),
 	EVDEV_MODEL_CYAPA = (1 << 15),
 	EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17),
-	EVDEV_MODEL_PRECISE_TOUCHPAD = (1 << 18),
 	EVDEV_MODEL_TRACKBALL = (1 << 19),
 };
 
diff --git a/test/litest-device-synaptics-x1-carbon-3rd.c b/test/litest-device-synaptics-x1-carbon-3rd.c
index 9d4034d..23d9c5b 100644
--- a/test/litest-device-synaptics-x1-carbon-3rd.c
+++ b/test/litest-device-synaptics-x1-carbon-3rd.c
@@ -121,7 +121,6 @@ static const char udev_rule[] =
 "\n"
 "ATTRS{name}==\"litest SynPS/2 Synaptics TouchPad X1C3rd\","
 "    ENV{LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD}=\"1\"\n"
-"    ENV{LIBINPUT_MODEL_PRECISE_TOUCHPAD}=\"1\"\n"
 "\n"
 "LABEL=\"touchpad_end\"";
 
diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
index 821bc16..1571abc 100644
--- a/udev/90-libinput-model-quirks.hwdb
+++ b/udev/90-libinput-model-quirks.hwdb
@@ -32,7 +32,6 @@ libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800
 libinput:touchpad:input:b0003v05ACp*
 libinput:touchpad:input:b0005v05ACp*
  LIBINPUT_MODEL_APPLE_TOUCHPAD=1
- LIBINPUT_MODEL_PRECISE_TOUCHPAD=1
  LIBINPUT_ATTR_SIZE_HINT=104x75
 
 libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:*
@@ -103,7 +102,6 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??50*:
 libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??60*:
 libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:*
  LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1
- LIBINPUT_MODEL_PRECISE_TOUCHPAD=1
 
 ##########################################
 # Logitech
-- 
2.7.4



More information about the wayland-devel mailing list