mirror of
https://github.com/X11Libre/xf86-input-libinput.git
synced 2026-03-24 01:24:04 +00:00
Also use type to match tablet tool with device
On devices with tools having both serial and id 0, it would fail to create separate subdevices. Thinkpad X220T (Wacom ISDv4 E6) now correctly registers Pen and Eraser xinput devices.
This commit is contained in:
@@ -1791,7 +1791,9 @@ xf86libinput_pick_device(struct xf86libinput_device *shared_device,
|
||||
if (libinput_tablet_tool_get_serial(driver_data->tablet_tool) ==
|
||||
libinput_tablet_tool_get_serial(tool) &&
|
||||
libinput_tablet_tool_get_tool_id(driver_data->tablet_tool) ==
|
||||
libinput_tablet_tool_get_tool_id(tool))
|
||||
libinput_tablet_tool_get_tool_id(tool) &&
|
||||
libinput_tablet_tool_get_type(driver_data->tablet_tool) ==
|
||||
libinput_tablet_tool_get_type(tool))
|
||||
return driver_data->pInfo;
|
||||
}
|
||||
}
|
||||
@@ -2111,13 +2113,15 @@ xf86libinput_find_device_for_tool(InputInfoPtr pInfo,
|
||||
struct xf86libinput_device *shared_device = driver_data->shared_device;
|
||||
uint64_t serial = libinput_tablet_tool_get_serial(tool);
|
||||
uint64_t tool_id = libinput_tablet_tool_get_tool_id(tool);
|
||||
enum libinput_event_type tool_type = libinput_tablet_tool_get_type(tool);
|
||||
|
||||
xorg_list_for_each_entry(dev,
|
||||
&shared_device->device_list,
|
||||
shared_device_link) {
|
||||
if (dev->tablet_tool &&
|
||||
libinput_tablet_tool_get_serial(dev->tablet_tool) == serial &&
|
||||
libinput_tablet_tool_get_tool_id(dev->tablet_tool) == tool_id) {
|
||||
libinput_tablet_tool_get_tool_id(dev->tablet_tool) == tool_id &&
|
||||
libinput_tablet_tool_get_type(dev->tablet_tool) == tool_type) {
|
||||
return dev->pInfo->dev;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user