x11: Assign GDK_SOURCE_TABLET_PAD when necessary
authorJason Gerecke <killertofu@gmail.com>
Tue, 27 Jun 2017 21:21:05 +0000 (14:21 -0700)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 30 Jun 2017 18:41:36 +0000 (20:41 +0200)
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

gdk/x11/gdkdevicemanager-xi2.c

index 6c941d56f2c125df0e70ac1986b6d8d46c2400fd..e7dfcb587d9a47459cc0816abb1c64c3f4ccac1c 100644 (file)
@@ -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;