1
0
Fork 0

monitor-manager: Use connect_object to connect to settings signals

We were disconnecting from the wrong object, so instead of adjusting it
we can simply use "new" utility functions instead.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1964>
This commit is contained in:
Marco Trevisan (Treviño) 2021-03-19 15:39:35 +01:00 committed by Marge Bot
parent 16e335eb24
commit ef0f708404
2 changed files with 4 additions and 10 deletions

View file

@ -148,8 +148,6 @@ struct _MetaMonitorManager
GnomePnpIds *pnp_ids;
gulong experimental_features_changed_handler_id;
MetaMonitorSwitchConfigType current_switch_config;
};

View file

@ -1055,11 +1055,10 @@ meta_monitor_manager_constructed (GObject *object)
manager->display_config = meta_dbus_display_config_skeleton_new ();
manager->experimental_features_changed_handler_id =
g_signal_connect (settings,
"experimental-features-changed",
G_CALLBACK (experimental_features_changed),
manager);
g_signal_connect_object (settings,
"experimental-features-changed",
G_CALLBACK (experimental_features_changed),
manager, 0);
monitor_manager_setup_dbus_config_handlers (manager);
@ -1102,9 +1101,6 @@ meta_monitor_manager_finalize (GObject *object)
g_warn_if_fail (!priv->virtual_monitors);
g_clear_signal_handler (&manager->experimental_features_changed_handler_id,
manager->backend);
G_OBJECT_CLASS (meta_monitor_manager_parent_class)->finalize (object);
}