diff --git a/src/backends/x11/meta-monitor-manager-xrandr.c b/src/backends/x11/meta-monitor-manager-xrandr.c index 900884170..3c114cf71 100644 --- a/src/backends/x11/meta-monitor-manager-xrandr.c +++ b/src/backends/x11/meta-monitor-manager-xrandr.c @@ -43,6 +43,8 @@ #include #include "meta-monitor-config.h" +#include "meta-stage.h" + #define ALL_TRANSFORMS ((1 << (META_MONITOR_TRANSFORM_FLIPPED_270 + 1)) - 1) /* Look for DPI_FALLBACK in: @@ -646,6 +648,23 @@ get_xmode_name (XRRModeInfo *xmode) return g_strdup_printf ("%dx%d", width, height); } +static void +update_stage_visibility_for_power_save_mode (MetaMonitorManager *manager) +{ + MetaBackend *backend = meta_get_backend (); + ClutterActor *stage = meta_backend_get_stage (backend); + + if ((manager->power_save_mode != META_POWER_SAVE_ON) && + (manager->power_save_mode != META_POWER_SAVE_UNSUPPORTED)) + { + meta_stage_set_black (META_STAGE (stage), TRUE); + } + else + { + meta_stage_set_black (META_STAGE (stage), FALSE); + } +} + static void meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager) { @@ -693,6 +712,8 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager) manager->power_save_mode = META_POWER_SAVE_UNSUPPORTED; } + update_stage_visibility_for_power_save_mode (manager); + XRRGetScreenSizeRange (manager_xrandr->xdisplay, DefaultRootWindow (manager_xrandr->xdisplay), &min_width, &min_height,