summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2017-06-27 14:21:05 -0700
committerCarlos Garnacho <carlosg@gnome.org>2017-06-30 20:46:01 +0200
commit07f4139004f8900d160278be39e1c53dc45b0459 (patch)
tree9e5aa82f55ea9cd1ea46417c86f52e4f97584b7c
parentd7b175a3fbba1f7b7236182ee3beeda4d973a991 (diff)
downloadgtk+-07f4139004f8900d160278be39e1c53dc45b0459.tar.gz
x11: Assign GDK_SOURCE_TABLET_PAD when necessary
Wacom tablets often have a "pad" device which houses multiple buttons. At present, these devices are incorrectly marked as GDK_SOURCE_PEN which can cause problems for some software. https://bugzilla.gnome.org/show_bug.cgi?id=782040
-rw-r--r--gdk/x11/gdkdevicemanager-xi2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 6c941d56f2..e7dfcb587d 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -433,6 +433,8 @@ create_device (GdkDeviceManager *device_manager,
input_source = GDK_SOURCE_ERASER;
else if (strstr (tmp_name, "cursor"))
input_source = GDK_SOURCE_CURSOR;
+ else if (strstr (tmp_name, " pad"))
+ input_source = GDK_SOURCE_TABLET_PAD;
else if (strstr (tmp_name, "wacom") ||
strstr (tmp_name, "pen"))
input_source = GDK_SOURCE_PEN;