x11: make the tool lookup dependent on the hw id as well

Tools on the same physical item have the same serial number, so the eraser
and the pen part of a single pen share that serial number. With the current
lookup code, we'll always return whichever tool comes first into proximity.

Change the code to use the hw id in addition to the serial number, this way we
can differ between two tools.
This commit is contained in:
Peter Hutterer
2018-12-14 15:28:29 +10:00
parent c6dd92294d
commit 7b33369bfb
4 changed files with 12 additions and 9 deletions

View File

@ -1115,7 +1115,7 @@ handle_property_change (GdkX11DeviceManagerXI2 *device_manager,
device_get_tool_serial_and_id (device, &serial_id, &tool_id))
{
seat = gdk_device_get_seat (device);
tool = gdk_seat_get_tool (seat, serial_id);
tool = gdk_seat_get_tool (seat, serial_id, tool_id);
if (!tool && serial_id > 0)
{