Blame SOURCES/0001-Create-explicit-WacomDevices-for-tablet-touchpad-dev.patch

657d8e
From 38d88d4e4286c3ada041561426873e44fdba3c40 Mon Sep 17 00:00:00 2001
657d8e
From: Carlos Garnacho <carlosg@gnome.org>
657d8e
Date: Fri, 17 Jan 2020 14:45:00 +0100
657d8e
Subject: [PATCH] Create explicit WacomDevices for tablet "touchpad" devices
657d8e
657d8e
---
657d8e
 src/backends/meta-input-settings.c | 15 +++++++++++----
657d8e
 1 file changed, 11 insertions(+), 4 deletions(-)
657d8e
657d8e
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
657d8e
index 28dc387ef9..820a3b201e 100644
657d8e
--- a/src/backends/meta-input-settings.c
657d8e
+++ b/src/backends/meta-input-settings.c
657d8e
@@ -521,27 +521,34 @@ static gboolean
657d8e
 device_is_tablet_touchpad (MetaInputSettings  *input_settings,
657d8e
                            ClutterInputDevice *device)
657d8e
 {
657d8e
+  gboolean is_tablet = FALSE;
657d8e
 #ifdef HAVE_LIBWACOM
657d8e
+  MetaInputSettingsPrivate *priv;
657d8e
   WacomIntegrationFlags flags = 0;
657d8e
   WacomDevice *wacom_device;
657d8e
 
657d8e
+  priv = meta_input_settings_get_instance_private (input_settings);
657d8e
+
657d8e
   if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
657d8e
     return FALSE;
657d8e
 
657d8e
   wacom_device =
657d8e
-    meta_input_settings_get_tablet_wacom_device (input_settings,
657d8e
-                                                 device);
657d8e
+    libwacom_new_from_path (priv->wacom_db,
657d8e
+                            clutter_input_device_get_device_node (device),
657d8e
+                            WFALLBACK_NONE, NULL);
657d8e
   if (wacom_device)
657d8e
     {
657d8e
       flags = libwacom_get_integration_flags (wacom_device);
657d8e
 
657d8e
       if ((flags & (WACOM_DEVICE_INTEGRATED_SYSTEM |
657d8e
                     WACOM_DEVICE_INTEGRATED_DISPLAY)) == 0)
657d8e
-        return TRUE;
657d8e
+        is_tablet = TRUE;
657d8e
+
657d8e
+      libwacom_destroy (wacom_device);
657d8e
     }
657d8e
 #endif
657d8e
 
657d8e
-  return FALSE;
657d8e
+  return is_tablet;
657d8e
 }
657d8e
 
657d8e
 static void
657d8e
-- 
657d8e
2.25.0.rc2
657d8e