Recognize "stylus" devices as GDK_SOURCE_PEN

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.
This commit is contained in:
Nate Eldredge 2022-09-17 15:06:27 +02:00 committed by Luca Bacci
parent 5f8ab17a0c
commit 8984b13d84

View File

@ -453,7 +453,8 @@ create_device (GdkDeviceManager *device_manager,
else if (strstr (tmp_name, " pad"))
input_source = GDK_SOURCE_TABLET_PAD;
else if (strstr (tmp_name, "wacom") ||
strstr (tmp_name, "pen"))
strstr (tmp_name, "pen") ||
strstr (tmp_name, "stylus"))
input_source = GDK_SOURCE_PEN;
else if (!strstr (tmp_name, "mouse") &&
!strstr (tmp_name, "pointer") &&