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



commit 37e154c832de9e3e3653c08eafbdd4c08de6e84a
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Wed Apr 3 16:29:54 2019 +0200

    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>

 src/backends/meta-monitor-config-manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/meta-monitor-config-manager.c b/src/backends/meta-monitor-config-manager.c
index aca753363b..f905983d5b 100644
--- a/src/backends/meta-monitor-config-manager.c
+++ b/src/backends/meta-monitor-config-manager.c
@@ -1534,8 +1534,8 @@ meta_monitors_config_new (MetaMonitorManager           *monitor_manager,
       MetaMonitor *monitor = l->data;
       MetaMonitorSpec *monitor_spec;
 
-      if (is_lid_closed (monitor_manager) &&
-          meta_monitor_is_laptop_panel (monitor))
+      if (!monitor_matches_rule (monitor, monitor_manager,
+                                 MONITOR_MATCH_VISIBLE))
         continue;
 
       monitor_spec = meta_monitor_get_spec (monitor);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]