mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 19:50:25 +01:00
evdev: Drop EVDEV_MOTION_REL flag
This is only used inside evdev_configure_device() and we now use a local has_rel flag instead.
This commit is contained in:
parent
a5db876938
commit
606706f87f
2 changed files with 5 additions and 5 deletions
|
|
@ -473,10 +473,11 @@ evdev_configure_device(struct evdev_device *device)
|
|||
unsigned long abs_bits[NBITS(ABS_MAX)];
|
||||
unsigned long rel_bits[NBITS(REL_MAX)];
|
||||
unsigned long key_bits[NBITS(KEY_MAX)];
|
||||
int has_key, has_abs;
|
||||
int has_key, has_abs, has_rel;
|
||||
unsigned int i;
|
||||
|
||||
has_key = 0;
|
||||
has_rel = 0;
|
||||
has_abs = 0;
|
||||
device->caps = 0;
|
||||
|
||||
|
|
@ -542,7 +543,7 @@ evdev_configure_device(struct evdev_device *device)
|
|||
ioctl(device->fd, EVIOCGBIT(EV_REL, sizeof(rel_bits)),
|
||||
rel_bits);
|
||||
if (TEST_BIT(rel_bits, REL_X) || TEST_BIT(rel_bits, REL_Y))
|
||||
device->caps |= EVDEV_MOTION_REL;
|
||||
has_rel = 1;
|
||||
}
|
||||
if (TEST_BIT(ev_bits, EV_KEY)) {
|
||||
has_key = 1;
|
||||
|
|
@ -584,7 +585,7 @@ evdev_configure_device(struct evdev_device *device)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if ((device->caps & (EVDEV_MOTION_ABS | EVDEV_MOTION_REL)) &&
|
||||
if ((device->caps & EVDEV_MOTION_ABS || has_rel) &&
|
||||
(device->caps & EVDEV_BUTTON))
|
||||
device->seat_caps |= EVDEV_DEVICE_POINTER;
|
||||
if ((device->caps & EVDEV_KEYBOARD))
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ enum evdev_device_capability {
|
|||
EVDEV_KEYBOARD = (1 << 0),
|
||||
EVDEV_BUTTON = (1 << 1),
|
||||
EVDEV_MOTION_ABS = (1 << 2),
|
||||
EVDEV_MOTION_REL = (1 << 3),
|
||||
EVDEV_TOUCH = (1 << 4),
|
||||
EVDEV_TOUCH = (1 << 3),
|
||||
};
|
||||
|
||||
enum evdev_device_seat_capability {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue