mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-06 09:10:27 +01:00
evdev: Replace EVDEV_MOTION_ABS with local has_abs flag
This commit is contained in:
parent
7226e8c368
commit
a847278c4a
2 changed files with 2 additions and 6 deletions
|
|
@ -499,14 +499,12 @@ evdev_configure_device(struct evdev_device *device)
|
|||
ioctl(device->fd, EVIOCGABS(ABS_X), &absinfo);
|
||||
device->abs.min_x = absinfo.minimum;
|
||||
device->abs.max_x = absinfo.maximum;
|
||||
device->caps |= EVDEV_MOTION_ABS;
|
||||
has_abs = 1;
|
||||
}
|
||||
if (TEST_BIT(abs_bits, ABS_Y)) {
|
||||
ioctl(device->fd, EVIOCGABS(ABS_Y), &absinfo);
|
||||
device->abs.min_y = absinfo.minimum;
|
||||
device->abs.max_y = absinfo.maximum;
|
||||
device->caps |= EVDEV_MOTION_ABS;
|
||||
has_abs = 1;
|
||||
}
|
||||
/* We only handle the slotted Protocol B in weston.
|
||||
|
|
@ -587,8 +585,7 @@ evdev_configure_device(struct evdev_device *device)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if ((device->caps & EVDEV_MOTION_ABS || has_rel) &&
|
||||
(device->caps & EVDEV_BUTTON))
|
||||
if ((has_abs || has_rel) && (device->caps & EVDEV_BUTTON))
|
||||
device->seat_caps |= EVDEV_DEVICE_POINTER;
|
||||
if ((device->caps & EVDEV_KEYBOARD))
|
||||
device->seat_caps |= EVDEV_DEVICE_KEYBOARD;
|
||||
|
|
|
|||
|
|
@ -46,8 +46,7 @@ enum evdev_event_type {
|
|||
enum evdev_device_capability {
|
||||
EVDEV_KEYBOARD = (1 << 0),
|
||||
EVDEV_BUTTON = (1 << 1),
|
||||
EVDEV_MOTION_ABS = (1 << 2),
|
||||
EVDEV_TOUCH = (1 << 3),
|
||||
EVDEV_TOUCH = (1 << 2),
|
||||
};
|
||||
|
||||
enum evdev_device_seat_capability {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue