[PATCH libinput 3/3] touchpad: drop TOUCHPAD_HAS_TRACKPOINT_BUTTONS parsing

Peter Hutterer peter.hutterer at who-t.net
Wed Jul 22 21:59:35 PDT 2015


This was a stopgap measure to support the Lenovo Carbon X1 3rd and the Lenovo
*50 series. These devices have the trackpoint buttons wired to the touchpad
and thus trackpoint events came from the touchpad device.

This was fixed in the kernel commit cdd9dc195916ef5644cfac079094c3c1d1616e4c,
the systemd hwdb to set this property was removed in 05304592457e01 so nothing
sets this property anymore. Drop it.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-mt-touchpad.c                      |  7 +------
 src/evdev.h                                  |  3 +--
 test/litest-device-synaptics-x1-carbon-3rd.c | 11 -----------
 3 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index ad198e9..4e290f8 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -409,8 +409,7 @@ tp_process_trackpoint_button(struct tp_dispatch *tp,
 	struct evdev_dispatch *dispatch;
 	struct input_event event;
 
-	if (!tp->buttons.trackpoint ||
-	    (tp->device->tags & EVDEV_TAG_TOUCHPAD_TRACKPOINT) == 0)
+	if (!tp->buttons.trackpoint)
 		return;
 
 	dispatch = tp->buttons.trackpoint->dispatch;
@@ -1291,10 +1290,6 @@ evdev_tag_touchpad(struct evdev_device *device,
 			 device->tags |= EVDEV_TAG_INTERNAL_TOUCHPAD;
 	} else if (bustype != BUS_BLUETOOTH)
 		device->tags |= EVDEV_TAG_INTERNAL_TOUCHPAD;
-
-	if (udev_device_get_property_value(udev_device,
-					   "TOUCHPAD_HAS_TRACKPOINT_BUTTONS"))
-		device->tags |= EVDEV_TAG_TOUCHPAD_TRACKPOINT;
 }
 
 static struct evdev_dispatch_interface tp_interface = {
diff --git a/src/evdev.h b/src/evdev.h
index 6a71232..36eac21 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -67,8 +67,7 @@ enum evdev_device_tags {
 	EVDEV_TAG_EXTERNAL_MOUSE = (1 << 0),
 	EVDEV_TAG_INTERNAL_TOUCHPAD = (1 << 1),
 	EVDEV_TAG_TRACKPOINT = (1 << 2),
-	EVDEV_TAG_TOUCHPAD_TRACKPOINT = (1 << 3),
-	EVDEV_TAG_KEYBOARD = (1 << 4),
+	EVDEV_TAG_KEYBOARD = (1 << 3),
 };
 
 enum evdev_middlebutton_state {
diff --git a/test/litest-device-synaptics-x1-carbon-3rd.c b/test/litest-device-synaptics-x1-carbon-3rd.c
index 2005c8c..718d108 100644
--- a/test/litest-device-synaptics-x1-carbon-3rd.c
+++ b/test/litest-device-synaptics-x1-carbon-3rd.c
@@ -114,16 +114,6 @@ static struct input_absinfo absinfo[] = {
 	{ .value = -1 }
 };
 
-static const char udev_rule[] =
-"ACTION==\"remove\", GOTO=\"touchpad_end\"\n"
-"KERNEL!=\"event*\", GOTO=\"touchpad_end\"\n"
-"ENV{ID_INPUT_TOUCHPAD}==\"\", GOTO=\"touchpad_end\"\n"
-"\n"
-"ATTRS{name}==\"litest*X1C3rd*\",\\\n"
-"    ENV{TOUCHPAD_HAS_TRACKPOINT_BUTTONS}=\"1\"\n"
-"\n"
-"LABEL=\"touchpad_end\"";
-
 struct litest_test_device litest_synaptics_carbon3rd_device = {
 	.type = LITEST_SYNAPTICS_TRACKPOINT_BUTTONS,
 	.features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON,
@@ -135,5 +125,4 @@ struct litest_test_device litest_synaptics_carbon3rd_device = {
 	.id = &input_id,
 	.events = events,
 	.absinfo = absinfo,
-	.udev_rule = udev_rule,
 };
-- 
2.4.3



More information about the wayland-devel mailing list