From 423bd702381dd877021b6fc984f470b251bcaf1f Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 16 Sep 2013 16:07:57 +0200 Subject: [PATCH] MonitorConfig: fix hole filling in the laptop lid automatic configuration Need two passes, because the order we traverse the array is alphabetical on connector name, not left to right, so we might see a monitor on the right before we get the offset from disabling the primary monitor. https://bugzilla.gnome.org/show_bug.cgi?id=707473 --- src/core/monitor-config.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/monitor-config.c b/src/core/monitor-config.c index f07b93eee..8fcd49608 100644 --- a/src/core/monitor-config.c +++ b/src/core/monitor-config.c @@ -946,9 +946,12 @@ make_laptop_lid_config (MetaConfiguration *reference) y_offset = current_output->rect.height; } else + new->outputs[i] = *current_output; + } + for (i = 0; i < new->n_outputs; i++) + { + if (new->outputs[i].enabled) { - new->outputs[i] = *current_output; - if (new->outputs[i].rect.x > x_after) new->outputs[i].rect.x -= x_offset; if (new->outputs[i].rect.y > y_after)