Blame SOURCES/0001-Skip-wacom-touchpads-when-updating-setting.patch

657d8e
From dafc9cb414fd47112b972d34c205e73797a3c1c1 Mon Sep 17 00:00:00 2001
657d8e
From: Carlos Garnacho <carlosg@gnome.org>
657d8e
Date: Fri, 21 Feb 2020 16:45:35 +0100
657d8e
Subject: [PATCH] Skip wacom touchpads when updating setting
657d8e
657d8e
---
657d8e
 src/backends/meta-input-settings.c | 46 +++++++++++++++++++++++-------
657d8e
 1 file changed, 36 insertions(+), 10 deletions(-)
657d8e
657d8e
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
657d8e
index cdff7b346..7d866594a 100644
657d8e
--- a/src/backends/meta-input-settings.c
657d8e
+++ b/src/backends/meta-input-settings.c
657d8e
@@ -569,20 +569,33 @@ update_touchpad_tap_enabled (MetaInputSettings  *input_settings,
657d8e
 
657d8e
   priv = meta_input_settings_get_instance_private (input_settings);
657d8e
   input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
657d8e
-  enabled = device_is_tablet_touchpad (input_settings, device) ||
657d8e
-    g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
657d8e
 
657d8e
   if (device)
657d8e
     {
657d8e
+      enabled = device_is_tablet_touchpad (input_settings, device) ||
657d8e
+        g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
657d8e
       settings_device_set_bool_setting (input_settings, device,
657d8e
                                         input_settings_class->set_tap_enabled,
657d8e
                                         enabled);
657d8e
     }
657d8e
   else
657d8e
     {
657d8e
-      settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE,
657d8e
-                                 input_settings_class->set_tap_enabled,
657d8e
-                                 enabled);
657d8e
+      const GSList *devices, *l;
657d8e
+
657d8e
+      devices = clutter_device_manager_peek_devices (priv->device_manager);
657d8e
+      for (l = devices; l; l = l->next)
657d8e
+        {
657d8e
+          device = l->data;
657d8e
+
657d8e
+          if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
657d8e
+            continue;
657d8e
+
657d8e
+          enabled = device_is_tablet_touchpad (input_settings, device) ||
657d8e
+            g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
657d8e
+          settings_device_set_bool_setting (input_settings, device,
657d8e
+                                            input_settings_class->set_tap_enabled,
657d8e
+                                            enabled);
657d8e
+        }
657d8e
     }
657d8e
 }
657d8e
 
657d8e
@@ -600,20 +613,33 @@ update_touchpad_tap_and_drag_enabled (MetaInputSettings  *input_settings,
657d8e
 
657d8e
   priv = meta_input_settings_get_instance_private (input_settings);
657d8e
   input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
657d8e
-  enabled = device_is_tablet_touchpad (input_settings, device) ||
657d8e
-    g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
657d8e
 
657d8e
   if (device)
657d8e
     {
657d8e
+      enabled = device_is_tablet_touchpad (input_settings, device) ||
657d8e
+        g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
657d8e
       settings_device_set_bool_setting (input_settings, device,
657d8e
                                         input_settings_class->set_tap_and_drag_enabled,
657d8e
                                         enabled);
657d8e
     }
657d8e
   else
657d8e
     {
657d8e
-      settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE,
657d8e
-                                 input_settings_class->set_tap_and_drag_enabled,
657d8e
-                                 enabled);
657d8e
+      const GSList *devices, *l;
657d8e
+
657d8e
+      devices = clutter_device_manager_peek_devices (priv->device_manager);
657d8e
+      for (l = devices; l; l = l->next)
657d8e
+        {
657d8e
+          device = l->data;
657d8e
+
657d8e
+          if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
657d8e
+            continue;
657d8e
+
657d8e
+          enabled = device_is_tablet_touchpad (input_settings, device) ||
657d8e
+            g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
657d8e
+          settings_device_set_bool_setting (input_settings, device,
657d8e
+                                            input_settings_class->set_tap_and_drag_enabled,
657d8e
+                                            enabled);
657d8e
+        }
657d8e
     }
657d8e
 }
657d8e
 
657d8e
-- 
657d8e
2.24.1
657d8e