monitor-manager: Don't use switch-config when ensuring configuration
authorJonas Ådahl <jadahl@gmail.com>
Thu, 11 Oct 2018 13:16:26 +0000 (13:16 +0000)
committerSimon McVittie <smcv@debian.org>
Wed, 6 Feb 2019 10:02:14 +0000 (10:02 +0000)
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 6267732bec97773.

(cherry picked from commit 149e4d69345adab2bfea84a04f88511cbad62fe0)

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/342
Applied-upstream: 3.30.3, commit:7260ba5db3fcf9b086944aef9f3d89f159ece137

Gbp-Pq: Name monitor-manager-Don-t-use-switch-config-when-ensuring-con.patch

src/backends/meta-monitor-manager.c

index baed7521dd4bead18db91c31c0972fd5271f7ed7..d9236b928badea039518f07d805ff2a313efa6e5 100644 (file)
@@ -561,9 +561,7 @@ meta_monitor_manager_ensure_configured (MetaMonitorManager *manager)
       g_clear_object (&config);
     }
 
-  config =
-    meta_monitor_config_manager_create_for_switch_config (manager->config_manager,
-                                                          META_MONITOR_SWITCH_CONFIG_ALL_LINEAR);
+  config = meta_monitor_config_manager_create_linear (manager->config_manager);
   if (config)
     {
       if (!meta_monitor_manager_apply_monitors_config (manager,