Recognize "stylus" devices as GDK_SOURCE_PEN
authorNate Eldredge <nate@thatsmathematics.com>
Sun, 29 May 2022 21:12:37 +0000 (15:12 -0600)
committerNate Eldredge <nate@thatsmathematics.com>
Sun, 29 May 2022 21:30:19 +0000 (15:30 -0600)
Add "stylus" to the list of substrings in a device name that cause it to be recognized
as a GDK_SOURCE_PEN device (previously "wacom", "pen" and "eraser").  Some devices
just use "stylus" in their name, and are otherwise recognized as
GDK_SOURCE_TOUCHSCREEN instead.

Fixes #4394.

gdk/x11/gdkdevicemanager-xi2.c

index a146333b5da88dac65a2a853086110f7a29c9829..ac2756460330b4e286af146436ac817c6ee4802f 100644 (file)
@@ -485,6 +485,7 @@ create_device (GdkX11DeviceManagerXI2 *device_manager,
         input_source = GDK_SOURCE_TABLET_PAD;
       else if (strstr (tmp_name, "wacom") ||
                strstr (tmp_name, "pen") ||
+               strstr (tmp_name, "stylus") ||
                strstr (tmp_name, "eraser"))
         input_source = GDK_SOURCE_PEN;
       else if (!strstr (tmp_name, "mouse") &&