From 1f29dad46fc4f7a6002f73c4dd83e104d1b406cb Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Thu, 7 Mar 2019 18:57:05 +0100 Subject: [PATCH] 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);