[gnome-settings-daemon/docking-stations] Oops, turn off laptop if lid is closed in make_xinerama_setup()



commit c144b32c9f55ab28db21c87c188f8f0b3fe48b61
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Nov 22 09:33:46 2011 -0600

    Oops, turn off laptop if lid is closed in make_xinerama_setup()
    
    Signed-off-by: Federico Mena Quintero <federico gnome org>

 plugins/xrandr/gsd-xrandr-manager.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 2cc70aa..6d6e364 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -1125,9 +1125,13 @@ make_xinerama_setup (GsdXrandrManager *manager, GnomeRRScreen *screen)
         for (i = 0; outputs[i] != NULL; ++i) {
                 GnomeRROutputInfo *info = outputs[i];
 
-                if (is_laptop (screen, info) && !laptop_lid_is_closed (manager)) {
-                        gnome_rr_output_info_set_primary (info, TRUE);
-                        x = turn_on_and_get_rightmost_offset (screen, info, x);
+                if (is_laptop (screen, info)) {
+                        if (laptop_lid_is_closed (manager))
+                                gnome_rr_output_info_set_active (info, FALSE);
+                        else {
+                                gnome_rr_output_info_set_primary (info, TRUE);
+                                x = turn_on_and_get_rightmost_offset (screen, info, x);
+                        }
                 }
         }
 



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