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:
parent
16e335eb24
commit
ef0f708404
@ -148,8 +148,6 @@ struct _MetaMonitorManager
|
||||
|
||||
GnomePnpIds *pnp_ids;
|
||||
|
||||
gulong experimental_features_changed_handler_id;
|
||||
|
||||
MetaMonitorSwitchConfigType current_switch_config;
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user