[gnome-settings-daemon/gnome-2-28] bnc#578296 - Always set the position of outputs, even if they are already turned on



commit f68e0e940cd889f2a220cb7c97d07f6968591504
Author: Federico Mena Quintero <federico novell com>
Date:   Wed Feb 10 13:39:36 2010 -0600

    bnc#578296 - Always set the position of outputs, even if they are already turned on
    
    Normally we would only position outputs that were turned off, but we
    actually need to do this for all outputs that will remain on.  Otherwise
    they could retain their old positions, which is wrong when in 'other' mode
    we retain a single external output with a non-zero X offset.
    
    Based on a patch by Takashi Iwai <tiwai novell com>
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 plugins/xrandr/gsd-xrandr-manager.c |   21 ++++++---------------
 1 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 6cd974f..6f4c062 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -655,12 +655,10 @@ make_laptop_setup (GnomeRRScreen *screen)
                 GnomeOutputInfo *info = result->outputs[i];
 
                 if (is_laptop (info)) {
-                        if (!info->on) {
-                                if (!turn_on (screen, info, 0, 0)) {
-                                        gnome_rr_config_free (result);
-                                        result = NULL;
-                                        break;
-                                }
+                        if (!turn_on (screen, info, 0, 0)) {
+                                gnome_rr_config_free (result);
+                                result = NULL;
+                                break;
                         }
                 }
                 else {
@@ -680,14 +678,8 @@ make_laptop_setup (GnomeRRScreen *screen)
 static int
 turn_on_and_get_rightmost_offset (GnomeRRScreen *screen, GnomeOutputInfo *info, int x)
 {
-        if (info->on) {
-                info->x = x;
-                info->y = 0;
+        if (turn_on (screen, info, x, 0))
                 x += info->width;
-        } else {
-                if (turn_on (screen, info, x, 0))
-                        x += info->width;
-        }
 
         return x;
 }
@@ -739,9 +731,8 @@ make_other_setup (GnomeRRScreen *screen)
                         info->on = FALSE;
                 }
                 else {
-                        if (info->connected && !info->on) {
+                        if (info->connected)
                                 turn_on (screen, info, 0, 0);
-                        }
                }
         }
 



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