[PATCH libinput] touchpad: add a model tag to mark touchpads with visible marker

Peter Hutterer peter.hutterer at who-t.net
Mon Jan 9 05:32:27 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>
---
 src/evdev-mt-touchpad-buttons.c | 4 +---
 src/evdev.c                     | 2 +-
 src/evdev.h                     | 2 +-
 3 files changed, 3 insertions(+), 5 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),
-- 
2.9.3



More information about the wayland-devel mailing list