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>
This commit is contained in:
Carlos Garnacho 2021-05-02 16:36:49 +02:00 committed by Marge Bot
parent 7ba1448e5b
commit 63d969537f
4 changed files with 2 additions and 72 deletions

View File

@ -109,15 +109,6 @@ enum
static guint signals[N_SIGNALS] = { 0 }; static guint signals[N_SIGNALS] = { 0 };
enum
{
PROP_0,
PROP_SEAT,
N_PROPS,
};
static GParamSpec *props[N_PROPS] = { 0 };
static GSList * static GSList *
meta_input_settings_get_devices (MetaInputSettings *settings, meta_input_settings_get_devices (MetaInputSettings *settings,
ClutterInputDeviceType type) 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->current_tools, g_hash_table_unref);
g_clear_pointer (&priv->two_finger_devices, g_hash_table_destroy); 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); 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 static void
settings_device_set_bool_setting (MetaInputSettings *input_settings, settings_device_set_bool_setting (MetaInputSettings *input_settings,
ClutterInputDevice *device, ClutterInputDevice *device,
@ -1666,8 +1614,6 @@ meta_input_settings_class_init (MetaInputSettingsClass *klass)
object_class->dispose = meta_input_settings_dispose; object_class->dispose = meta_input_settings_dispose;
object_class->constructed = meta_input_settings_constructed; 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 = quark_tool_settings =
g_quark_from_static_string ("meta-input-settings-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_NONE, 1,
G_TYPE_POINTER); 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 static void

View File

@ -872,6 +872,5 @@ meta_input_settings_native_new_in_impl (MetaSeatImpl *seat_impl)
{ {
return g_object_new (META_TYPE_INPUT_SETTINGS_NATIVE, return g_object_new (META_TYPE_INPUT_SETTINGS_NATIVE,
"seat-impl", seat_impl, "seat-impl", seat_impl,
"seat", seat_impl->seat_native,
NULL); NULL);
} }

View File

@ -96,8 +96,7 @@ meta_backend_x11_cm_post_init (MetaBackend *backend)
g_signal_connect_object (seat, "device-added", g_signal_connect_object (seat, "device-added",
G_CALLBACK (on_device_added), backend, 0); G_CALLBACK (on_device_added), backend, 0);
x11_cm->input_settings = g_object_new (META_TYPE_INPUT_SETTINGS_X11, x11_cm->input_settings = g_object_new (META_TYPE_INPUT_SETTINGS_X11, NULL);
"seat", seat, NULL);
parent_backend_class->post_init (backend); parent_backend_class->post_init (backend);
take_touch_grab (backend); take_touch_grab (backend);

View File

@ -94,13 +94,8 @@ meta_backend_x11_nested_get_input_settings (MetaBackend *backend)
if (!priv->input_settings) if (!priv->input_settings)
{ {
ClutterSeat *seat;
seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
priv->input_settings = priv->input_settings =
g_object_new (META_TYPE_INPUT_SETTINGS_DUMMY, g_object_new (META_TYPE_INPUT_SETTINGS_DUMMY, NULL);
"seat", seat,
NULL);
} }
return priv->input_settings; return priv->input_settings;