input-settings: treat a serial of 1 as serial of 0

The Wacom Xorg driver assigns a serial number of 1 for any pad that doesn't
have a serial. libinput assigns 0. Just treat 1 as 0 here, there are no pens
with a real serial 1 anyway.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/414
This commit is contained in:
Peter Hutterer 2018-12-17 15:22:44 +10:00
parent 49c2be40bb
commit 9f3d321bf2

View File

@ -1326,7 +1326,9 @@ lookup_tool_settings (ClutterInputDeviceTool *tool,
serial = clutter_input_device_tool_get_serial (tool); serial = clutter_input_device_tool_get_serial (tool);
if (serial == 0) /* The Wacom driver uses serial 1 for serial-less devices but 1 is not a
* real serial, so let's custom-case this */
if (serial == 0 || serial == 1)
{ {
path = g_strdup_printf ("/org/gnome/desktop/peripherals/stylus/default-%s:%s/", path = g_strdup_printf ("/org/gnome/desktop/peripherals/stylus/default-%s:%s/",
clutter_input_device_get_vendor_id (device), clutter_input_device_get_vendor_id (device),