diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c index 375e9d298..709d4194c 100644 --- a/src/backends/meta-backend.c +++ b/src/backends/meta-backend.c @@ -123,6 +123,8 @@ struct _MetaBackendPrivate guint sleep_signal_id; GCancellable *cancellable; GDBusConnection *system_bus; + + gboolean was_headless; }; typedef struct _MetaBackendPrivate MetaBackendPrivate; @@ -223,6 +225,19 @@ meta_backend_monitors_changed (MetaBackend *backend) } meta_cursor_renderer_force_update (priv->cursor_renderer); + + if (meta_monitor_manager_is_headless (priv->monitor_manager) && + !priv->was_headless) + { + clutter_stage_freeze_updates (CLUTTER_STAGE (priv->stage)); + priv->was_headless = TRUE; + } + else if (!meta_monitor_manager_is_headless (priv->monitor_manager) && + priv->was_headless) + { + clutter_stage_thaw_updates (CLUTTER_STAGE (priv->stage)); + priv->was_headless = FALSE; + } } void