[PATCH libinput 2/4] test: mark the magic trackpad as external in udev

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 20 02:51:02 UTC 2016


This should be handled by a udev rule in systemd/hwdb but that rule doesn't
apply to virtual devices.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 test/litest-device-magic-trackpad.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/test/litest-device-magic-trackpad.c b/test/litest-device-magic-trackpad.c
index 598a735..cc37163 100644
--- a/test/litest-device-magic-trackpad.c
+++ b/test/litest-device-magic-trackpad.c
@@ -93,6 +93,16 @@ static int events[] = {
 	-1, -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 Apple Wireless Trackpad\","
+"    ENV{ID_INPUT_TOUCHPAD_INTEGRATION}=\"external\"\n"
+"\n"
+"LABEL=\"touchpad_end\"";
+
 struct litest_test_device litest_magicpad_device = {
 	.type = LITEST_MAGIC_TRACKPAD,
 	.features = LITEST_TOUCHPAD | LITEST_CLICKPAD |
@@ -105,4 +115,5 @@ struct litest_test_device litest_magicpad_device = {
 	.id = &input_id,
 	.events = events,
 	.absinfo = absinfo,
+	.udev_rule = udev_rule,
 };
-- 
2.9.3



More information about the wayland-devel mailing list