mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 14:40:26 +01:00
evdev: don't return a size for 0-1 axes
Tablet pads historically need to have ABS_X/Y to be detected as tablets but their min/max values are 0 and 1. Let's not return a size for those. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1004>
This commit is contained in:
parent
e802715785
commit
fe3175748a
1 changed files with 4 additions and 0 deletions
|
|
@ -2725,6 +2725,10 @@ evdev_device_get_size(const struct evdev_device *device,
|
|||
x = libevdev_get_abs_info(device->evdev, ABS_X);
|
||||
y = libevdev_get_abs_info(device->evdev, ABS_Y);
|
||||
|
||||
if ((x && x->minimum == 0 && x->maximum == 1) ||
|
||||
(y && y->minimum == 0 && y->maximum == 1))
|
||||
return -1;
|
||||
|
||||
if (!x || !y || device->abs.is_fake_resolution ||
|
||||
!x->resolution || !y->resolution)
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue