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

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