monitor-config-manager: Don't include closed laptop panel in config key

When deriving the list of disabled monitors when creating new monitors
configs, don't include the laptop panel if the lid is currently closed,
as we consider the laptop panel nonexistent when the laptop lid is
closed when it comes to configuration.

The laptop panel connector(s) will either way be appropriately disabled
anyway, as the field listing disabled monitors in the configuration do
not affect actual CRTC/connector assignments.

https://bugzilla.gnome.org/show_bug.cgi?id=788915
This commit is contained in:
Jonas Ådahl 2017-11-03 15:58:02 +08:00
parent 4508978ea5
commit 62dedfbef3

View File

@ -1238,6 +1238,10 @@ meta_monitors_config_new (MetaMonitorManager *monitor_manager,
MetaMonitor *monitor = l->data;
MetaMonitorSpec *monitor_spec;
if (meta_monitor_manager_is_lid_closed (monitor_manager) &&
meta_monitor_is_laptop_panel (monitor))
continue;
monitor_spec = meta_monitor_get_spec (monitor);
if (meta_logical_monitor_configs_have_monitor (logical_monitor_configs,
monitor_spec))