monitor-config-manager: Use match rule to check laptop panel visibility

Use the MONITOR_MATCH_VISIBLE match rule instead of doing the same check when
initializing the list of disabled monitor specs.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/522>
This commit is contained in:
Marco Trevisan (Treviño) 2019-04-03 16:29:54 +02:00 committed by Marge Bot
parent e59da5ad83
commit 37e154c832

View File

@ -1534,8 +1534,8 @@ meta_monitors_config_new (MetaMonitorManager *monitor_manager,
MetaMonitor *monitor = l->data; MetaMonitor *monitor = l->data;
MetaMonitorSpec *monitor_spec; MetaMonitorSpec *monitor_spec;
if (is_lid_closed (monitor_manager) && if (!monitor_matches_rule (monitor, monitor_manager,
meta_monitor_is_laptop_panel (monitor)) MONITOR_MATCH_VISIBLE))
continue; continue;
monitor_spec = meta_monitor_get_spec (monitor); monitor_spec = meta_monitor_get_spec (monitor);