[PATCH libinput 6/8] evdev: reject devices with either REL_X or REL_Y
Peter Hutterer
peter.hutterer at who-t.net
Sun Apr 26 22:52:32 PDT 2015
Not sure if any exists, if they do let's see if a user files a bug report
first so we know what to do with those (they're most likely buttonsets).
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/evdev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/evdev.c b/src/evdev.c
index 6a9df49..db19ac8 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1606,6 +1606,10 @@ evdev_reject_device(struct evdev_device *device)
libevdev_has_event_code(evdev, EV_ABS, ABS_Y))
return -1;
+ if (libevdev_has_event_code(evdev, EV_REL, REL_X) ^
+ libevdev_has_event_code(evdev, EV_REL, REL_Y))
+ return -1;
+
if (libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_X) ^
libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_Y))
return -1;
--
2.3.5
More information about the wayland-devel
mailing list