[gnome-control-center/benzea/fix-single-display-405: 13/14] display: Keep current monitor enabled when forcing an update



commit 1f29dad46fc4f7a6002f73c4dd83e104d1b406cb
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Mar 7 18:57:05 2019 +0100

    display: Keep current monitor enabled when forcing an update
    
    In the case where the user plugged/unplugged a screen, we could run into
    the case where we would first enable and then disable the same output.
    This could potentially result in an invalid configuration.
    
    Prevent this by not disabling the output if no switch happened.

 panels/display/cc-display-panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index f4af1b051..9604883d6 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -633,7 +633,7 @@ set_current_output (CcDisplayPanel   *panel,
     {
       if (output)
         cc_display_monitor_set_active (output, TRUE);
-      if (panel->current_output)
+      if (panel->current_output && output != panel->current_output)
         cc_display_monitor_set_active (panel->current_output, FALSE);
 
       update_apply_button (panel);


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