Commit 5aa17c69 authored by Benjamin Berg's avatar Benjamin Berg Committed by Georges Basile Stavracas Neto

display: Correctly select "single" mode when opening display panel

The dialog tried to retain the current configuration mode. However,
doing so means that we end up in the wrong mode in some situation (e.g.
opening the dialog with two displays but only one enabled).

Fix this by always selecting a configuration mode. This potentially
switches the user from "join" to "single" if only one monitor is left.
However, the user has no way to do this manually, so no unexpected UI
change will happen.
parent 0f257d24
......@@ -754,14 +754,9 @@ rebuild_ui (CcDisplayPanel *panel)
* And only in that mode do we allow mirroring. */
if (n_outputs == 2 && !panel->lid_is_closed)
{
CcDisplayConfigType types, type;
gtk_widget_set_visible (panel->config_type_switcher_frame, TRUE);
type = cc_panel_get_selected_type (panel);
types = config_find_types (panel);
if (!(type & types))
cc_panel_set_selected_type (panel, config_select_type (panel));
cc_panel_set_selected_type (panel, config_select_type (panel));
}
else
{
......
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