mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 14:40:26 +01:00
evdev: reject devices with only REL_X but no REL_Y (or vice versa)
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@who-t.net> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
parent
9191010ac2
commit
6083fafe53
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue