[mutter/wip/carlosg/shuffle-pointer-a11y: 8/8] backends: Drop MetaInputSettings::seat property




commit 63d969537f1dba623c1827cf0070ee6b4dfefee2
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun May 2 16:36:49 2021 +0200

    backends: Drop MetaInputSettings::seat property
    
    This is now entirely unused, and it's dubious it should ever
    be again.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1849>

 src/backends/meta-input-settings.c                | 63 -----------------------
 src/backends/native/meta-input-settings-native.c  |  1 -
 src/backends/x11/cm/meta-backend-x11-cm.c         |  3 +-
 src/backends/x11/nested/meta-backend-x11-nested.c |  7 +--
 4 files changed, 2 insertions(+), 72 deletions(-)
---
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
index 6448e65a2c..16618608bb 100644
--- a/src/backends/meta-input-settings.c
+++ b/src/backends/meta-input-settings.c
@@ -109,15 +109,6 @@ enum
 
 static guint signals[N_SIGNALS] = { 0 };
 
-enum
-{
-  PROP_0,
-  PROP_SEAT,
-  N_PROPS,
-};
-
-static GParamSpec *props[N_PROPS] = { 0 };
-
 static GSList *
 meta_input_settings_get_devices (MetaInputSettings      *settings,
                                  ClutterInputDeviceType  type)
@@ -155,53 +146,10 @@ meta_input_settings_dispose (GObject *object)
   g_clear_pointer (&priv->current_tools, g_hash_table_unref);
 
   g_clear_pointer (&priv->two_finger_devices, g_hash_table_destroy);
-  g_clear_object (&priv->seat);
 
   G_OBJECT_CLASS (meta_input_settings_parent_class)->dispose (object);
 }
 
-static void
-meta_input_settings_set_property (GObject      *object,
-                                  guint         prop_id,
-                                  const GValue *value,
-                                  GParamSpec   *pspec)
-{
-  MetaInputSettings *input_settings = META_INPUT_SETTINGS (object);
-  MetaInputSettingsPrivate *priv =
-    meta_input_settings_get_instance_private (input_settings);
-
-  switch (prop_id)
-    {
-    case PROP_SEAT:
-      priv->seat = g_value_dup_object (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-static void
-meta_input_settings_get_property (GObject    *object,
-                                  guint       prop_id,
-                                  GValue     *value,
-                                  GParamSpec *pspec)
-{
-  MetaInputSettings *input_settings = META_INPUT_SETTINGS (object);
-  MetaInputSettingsPrivate *priv =
-    meta_input_settings_get_instance_private (input_settings);
-
-  switch (prop_id)
-    {
-    case PROP_SEAT:
-      g_value_set_object (value, priv->seat);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
 static void
 settings_device_set_bool_setting (MetaInputSettings  *input_settings,
                                   ClutterInputDevice *device,
@@ -1666,8 +1614,6 @@ meta_input_settings_class_init (MetaInputSettingsClass *klass)
 
   object_class->dispose = meta_input_settings_dispose;
   object_class->constructed = meta_input_settings_constructed;
-  object_class->set_property = meta_input_settings_set_property;
-  object_class->get_property = meta_input_settings_get_property;
 
   quark_tool_settings =
     g_quark_from_static_string ("meta-input-settings-tool-settings");
@@ -1680,15 +1626,6 @@ meta_input_settings_class_init (MetaInputSettingsClass *klass)
                   G_TYPE_NONE, 1,
                   G_TYPE_POINTER);
 
-  props[PROP_SEAT] =
-    g_param_spec_object ("seat",
-                         "Seat",
-                         "Seat",
-                         CLUTTER_TYPE_SEAT,
-                         CLUTTER_PARAM_READWRITE |
-                         G_PARAM_CONSTRUCT_ONLY);
-
-  g_object_class_install_properties (object_class, N_PROPS, props);
 }
 
 static void
diff --git a/src/backends/native/meta-input-settings-native.c 
b/src/backends/native/meta-input-settings-native.c
index 5d85bb47e4..8f61b8bcc4 100644
--- a/src/backends/native/meta-input-settings-native.c
+++ b/src/backends/native/meta-input-settings-native.c
@@ -872,6 +872,5 @@ meta_input_settings_native_new_in_impl (MetaSeatImpl *seat_impl)
 {
   return g_object_new (META_TYPE_INPUT_SETTINGS_NATIVE,
                        "seat-impl", seat_impl,
-                       "seat", seat_impl->seat_native,
                        NULL);
 }
diff --git a/src/backends/x11/cm/meta-backend-x11-cm.c b/src/backends/x11/cm/meta-backend-x11-cm.c
index b4f40754fd..0a02e1df12 100644
--- a/src/backends/x11/cm/meta-backend-x11-cm.c
+++ b/src/backends/x11/cm/meta-backend-x11-cm.c
@@ -96,8 +96,7 @@ meta_backend_x11_cm_post_init (MetaBackend *backend)
   g_signal_connect_object (seat, "device-added",
                            G_CALLBACK (on_device_added), backend, 0);
 
-  x11_cm->input_settings = g_object_new (META_TYPE_INPUT_SETTINGS_X11,
-                                         "seat", seat, NULL);
+  x11_cm->input_settings = g_object_new (META_TYPE_INPUT_SETTINGS_X11, NULL);
 
   parent_backend_class->post_init (backend);
   take_touch_grab (backend);
diff --git a/src/backends/x11/nested/meta-backend-x11-nested.c 
b/src/backends/x11/nested/meta-backend-x11-nested.c
index 0b8c3053a6..dd9f318586 100644
--- a/src/backends/x11/nested/meta-backend-x11-nested.c
+++ b/src/backends/x11/nested/meta-backend-x11-nested.c
@@ -94,13 +94,8 @@ meta_backend_x11_nested_get_input_settings (MetaBackend *backend)
 
   if (!priv->input_settings)
     {
-      ClutterSeat *seat;
-
-      seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
       priv->input_settings =
-        g_object_new (META_TYPE_INPUT_SETTINGS_DUMMY,
-                      "seat", seat,
-                      NULL);
+        g_object_new (META_TYPE_INPUT_SETTINGS_DUMMY, NULL);
     }
 
   return priv->input_settings;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]