mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-01-04 14:30:21 +01:00
evdev: check for ABS_MT_POSITION_X/Y to determine mt devices
mtdev as currently used in weston is a noop. mtdev's purpose is to convert Protocol A devices (without ABS_MT_SLOT) to Protocol B devices (slots). For Protocol B devices mtdev merely routes the events, so checking for slots and then using mtdev based on that adds no functionality. Check for ABS_MT_POSITION_X/Y instead and use that to categorise a device as MT device. mtdev will provide us with a slotted protocol for all devices. https://bugs.freedesktop.org/show_bug.cgi?id=54428
This commit is contained in:
parent
f3d62276d2
commit
45d659dd82
1 changed files with 5 additions and 1 deletions
|
|
@ -454,7 +454,11 @@ evdev_handle_device(struct evdev_device *device)
|
|||
device->abs.max_y = absinfo.maximum;
|
||||
device->caps |= EVDEV_MOTION_ABS;
|
||||
}
|
||||
if (TEST_BIT(abs_bits, ABS_MT_SLOT)) {
|
||||
/* We only handle the slotted Protocol B in weston.
|
||||
Devices with ABS_MT_POSITION_* but not ABS_MT_SLOT
|
||||
require mtdev for conversion. */
|
||||
if (TEST_BIT(abs_bits, ABS_MT_POSITION_X) &&
|
||||
TEST_BIT(abs_bits, ABS_MT_POSITION_Y)) {
|
||||
ioctl(device->fd, EVIOCGABS(ABS_MT_POSITION_X),
|
||||
&absinfo);
|
||||
device->abs.min_x = absinfo.minimum;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue