Commit 1f29dad4 authored by Benjamin Berg's avatar Benjamin Berg Committed by Georges Basile Stavracas Neto

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.
parent 75bf1b8c
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment