monitor-manager: Don't use switch-config when ensuring configuration

Switch-configs are only to be used in certain circumstances (see
meta_monitor_manager_can_switch_config()) so when ensuring
configuration and attempting to create a linear configuration, use the
linear configuration constructor function directly without going via the
switch config method, otherwise we might incorrectly fall back to the
fallback configuration (only enable primary monitor).

This is a regression introduced by 6267732bec.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/342
This commit is contained in:
Jonas Ådahl 2018-10-11 15:16:26 +02:00 committed by Georges Basile Stavracas Neto
parent 8d514095cb
commit 149e4d6934

View File

@ -560,9 +560,7 @@ meta_monitor_manager_ensure_configured (MetaMonitorManager *manager)
g_clear_object (&config); g_clear_object (&config);
} }
config = config = meta_monitor_config_manager_create_linear (manager->config_manager);
meta_monitor_config_manager_create_for_switch_config (manager->config_manager,
META_MONITOR_SWITCH_CONFIG_ALL_LINEAR);
if (config) if (config)
{ {
if (!meta_monitor_manager_apply_monitors_config (manager, if (!meta_monitor_manager_apply_monitors_config (manager,