diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c index 00325d037..d7483d844 100644 --- a/src/backends/meta-monitor-manager.c +++ b/src/backends/meta-monitor-manager.c @@ -1330,6 +1330,15 @@ meta_monitor_manager_setup (MetaMonitorManager *manager) manager->in_init = FALSE; } +static void +on_started (MetaContext *context, + MetaMonitorManager *monitor_manager) +{ + g_signal_connect (monitor_manager, "notify::experimental-hdr", + G_CALLBACK (meta_monitor_manager_reconfigure), + NULL); +} + static void meta_monitor_manager_constructed (GObject *object) { @@ -1337,6 +1346,7 @@ meta_monitor_manager_constructed (GObject *object) MetaMonitorManagerPrivate *priv = meta_monitor_manager_get_instance_private (manager); MetaBackend *backend = manager->backend; + MetaContext *context = meta_backend_get_context (backend); MetaSettings *settings = meta_backend_get_settings (backend); manager->display_config = meta_dbus_display_config_skeleton_new (); @@ -1375,14 +1385,11 @@ meta_monitor_manager_constructed (GObject *object) G_CALLBACK (lid_is_closed_changed), manager, 0); + g_signal_connect (context, "started", G_CALLBACK (on_started), manager); g_signal_connect (backend, "prepare-shutdown", G_CALLBACK (prepare_shutdown), manager); - g_signal_connect (manager, "notify::experimental-hdr", - G_CALLBACK (ensure_hdr_settings), - NULL); - manager->current_switch_config = META_MONITOR_SWITCH_CONFIG_UNKNOWN; initialize_dbus_interface (manager);