=== modified file 'plugins/power/gsd-power-manager.c' --- plugins/power/gsd-power-manager.c 2012-03-07 11:46:50 +0000 +++ plugins/power/gsd-power-manager.c 2012-03-07 19:20:49 +0000 @@ -2272,7 +2272,7 @@ { GnomeRRConfig *config; GnomeRROutputInfo **outputs; - int i; + int i, how_many; gboolean all_off; config = gnome_rr_config_new_current (screen, NULL); /* NULL-GError */ @@ -2280,19 +2280,23 @@ return FALSE; outputs = gnome_rr_config_get_outputs (config); + how_many = 0; + all_off = TRUE; for (i = 0; outputs[i] != NULL; i++) { + how_many++; if (is_laptop (screen, outputs[i])) continue; if (gnome_rr_output_info_is_active (outputs[i])) { all_off = FALSE; - goto out; + /*goto out;*/ } } - - all_off = TRUE; - -out: + if (how_many == 1) { + g_debug("Only 1 connected display, assuming laptop display."); + all_off = TRUE; + } + g_object_unref (config); return all_off; }