[PATCH v2 libinput] touchpad: add a model tag to mark touchpads with visible marker
Peter Hutterer
peter.hutterer at who-t.net
Mon Jan 9 22:38:28 UTC 2017
We used to mark dell touchpads this way but let's make this more generic.
Nothing else used the dell touchpad model flag, so we can simply replace it.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
sorry, rebase gone wrong and it skipped the test/udev directories in v1.
src/evdev-mt-touchpad-buttons.c | 4 +---
src/evdev.c | 2 +-
src/evdev.h | 2 +-
test/litest-device-alps-dualpoint.c | 2 +-
test/litest-device-synaptics-i2c.c | 2 +-
udev/90-libinput-model-quirks.hwdb | 2 +-
6 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c
index b59cf13..f4fe6b7 100644
--- a/src/evdev-mt-touchpad-buttons.c
+++ b/src/evdev-mt-touchpad-buttons.c
@@ -569,10 +569,8 @@ tp_init_softbuttons(struct tp_dispatch *tp,
*
* On touchpads with visible markings we reduce the size of the
* middle button since users have a visual guide.
- *
- * All Dell touchpads appear to have a middle marker.
*/
- if (tp->device->model_flags & EVDEV_MODEL_DELL_TOUCHPAD) {
+ if (tp->device->model_flags & EVDEV_MODEL_TOUCHPAD_VISIBLE_MARKER) {
mm.x = width/2 - 5; /* 10mm wide */
edges = evdev_device_mm_to_units(device, &mm);
mb_le = edges.x;
diff --git a/src/evdev.c b/src/evdev.c
index c06daa6..6ab68ae 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2201,7 +2201,7 @@ evdev_read_model_flags(struct evdev_device *device)
MODEL(CYAPA),
MODEL(HP_STREAM11_TOUCHPAD),
MODEL(LENOVO_T450_TOUCHPAD),
- MODEL(DELL_TOUCHPAD),
+ MODEL(TOUCHPAD_VISIBLE_MARKER),
MODEL(TRACKBALL),
MODEL(APPLE_MAGICMOUSE),
MODEL(HP8510_TOUCHPAD),
diff --git a/src/evdev.h b/src/evdev.h
index c07b09f..7ad3dfd 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -116,7 +116,7 @@ enum evdev_device_model {
EVDEV_MODEL_CYAPA = (1 << 15),
EVDEV_MODEL_HP_STREAM11_TOUCHPAD = (1 << 16),
EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17),
- EVDEV_MODEL_DELL_TOUCHPAD = (1 << 18),
+ EVDEV_MODEL_TOUCHPAD_VISIBLE_MARKER = (1 << 18),
EVDEV_MODEL_TRACKBALL = (1 << 19),
EVDEV_MODEL_APPLE_MAGICMOUSE = (1 << 20),
EVDEV_MODEL_HP8510_TOUCHPAD = (1 << 21),
diff --git a/test/litest-device-alps-dualpoint.c b/test/litest-device-alps-dualpoint.c
index 08ba006..fe8cf96 100644
--- a/test/litest-device-alps-dualpoint.c
+++ b/test/litest-device-alps-dualpoint.c
@@ -106,7 +106,7 @@ static const char udev_rule[] =
"ENV{ID_INPUT_TOUCHPAD}==\"\", GOTO=\"touchpad_end\"\n"
"\n"
"ATTRS{name}==\"litest AlpsPS/2 ALPS DualPoint TouchPad\","
-" ENV{LIBINPUT_MODEL_DELL_TOUCHPAD}=\"1\"\n"
+" ENV{LIBINPUT_MODEL_TOUCHPAD_VISIBLE_MARKER}=\"1\"\n"
"\n"
"LABEL=\"touchpad_end\"";
diff --git a/test/litest-device-synaptics-i2c.c b/test/litest-device-synaptics-i2c.c
index 0d83caa..3e1d5e4 100644
--- a/test/litest-device-synaptics-i2c.c
+++ b/test/litest-device-synaptics-i2c.c
@@ -92,7 +92,7 @@ static const char udev_rule[] =
"ENV{ID_INPUT_TOUCHPAD}==\"\", GOTO=\"touchpad_end\"\n"
"\n"
"ATTRS{name}==\"litest DLL0704:01 06CB:76AD Touchpad\","
-" ENV{LIBINPUT_MODEL_DELL_TOUCHPAD}=\"1\"\n"
+" ENV{LIBINPUT_MODEL_TOUCHPAD_VISIBLE_MARKER}=\"1\"\n"
"\n"
"LABEL=\"touchpad_end\"";
diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
index eb74f61..e467e59 100644
--- a/udev/90-libinput-model-quirks.hwdb
+++ b/udev/90-libinput-model-quirks.hwdb
@@ -53,7 +53,7 @@ libinput:mouse:input:b0003v06A3p0CD5*
##########################################
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnDellInc.:*
libinput:name:* Touchpad:dmi:*svnDellInc.:*
- LIBINPUT_MODEL_DELL_TOUCHPAD=1
+ LIBINPUT_MODEL_TOUCHPAD_VISIBLE_MARKER=1
##########################################
# Elantech
--
2.9.3
More information about the wayland-devel
mailing list