Commit 21bb6416 authored by Benjamin Berg's avatar Benjamin Berg

display: Reset resolution when switching configuration types

It generally makes more sense to reset the resolution of a monitor after
we switch configuration types. The main case where this is relevant is
switching from a mirror configuration (CLONE) to either join or single.
In this case, higher resolutions for monitors may become available.

Note that this might be annoying to some users, because there may be
monitors reporting a lower "preferred" resolution than the highest
supported resolution. There is little we can do though, as always
selecting the highest resolution doesn't seem like a much better
approach.
parent ae22f72c
......@@ -239,11 +239,13 @@ config_ensure_of_type (CcDisplayPanel *panel, CcDisplayConfigType type)
if (cc_display_monitor_is_primary (output))
{
cc_display_monitor_set_active (output, TRUE);
cc_display_monitor_set_mode (output, cc_display_monitor_get_preferred_mode (output));
set_current_output (panel, output, FALSE);
}
else
{
cc_display_monitor_set_active (output, FALSE);
cc_display_monitor_set_mode (output, cc_display_monitor_get_preferred_mode (output));
}
}
break;
......@@ -259,6 +261,7 @@ config_ensure_of_type (CcDisplayPanel *panel, CcDisplayConfigType type)
CcDisplayMonitor *output = l->data;
cc_display_monitor_set_active (output, cc_display_monitor_is_usable (output));
cc_display_monitor_set_mode (output, cc_display_monitor_get_preferred_mode (output));
}
break;
......
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