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
This commit is contained in:
Giovanni Campagna 2013-09-16 16:07:57 +02:00 committed by Giovanni Campagna
parent 2fc9e1af58
commit 423bd70238

View File

@ -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)
{
if (new->outputs[i].rect.x > x_after)
new->outputs[i].rect.x -= x_offset;
if (new->outputs[i].rect.y > y_after)