[mutter] MonitorConfig: fix hole filling in the laptop lid automatic configuration



commit 423bd702381dd877021b6fc984f470b251bcaf1f
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Mon Sep 16 16:07:57 2013 +0200

    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 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/core/monitor-config.c b/src/core/monitor-config.c
index f07b93e..8fcd496 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]