[gnome-flashback] monitors-config: don't include closed laptop panel in config key



commit 568d351c695166a750076a9905076b74a4841318
Author: Jonas Ådahl <jadahl gmail com>
Date:   Fri Nov 3 15:58:02 2017 +0800

    monitors-config: 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

 backends/gf-monitors-config.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/backends/gf-monitors-config.c b/backends/gf-monitors-config.c
index 1629030..a39b7f8 100644
--- a/backends/gf-monitors-config.c
+++ b/backends/gf-monitors-config.c
@@ -169,6 +169,10 @@ gf_monitors_config_new (GfMonitorManager           *monitor_manager,
       GfMonitor *monitor = l->data;
       GfMonitorSpec *monitor_spec;
 
+      if (gf_monitor_manager_is_lid_closed (monitor_manager) &&
+          gf_monitor_is_laptop_panel (monitor))
+        continue;
+
       monitor_spec = gf_monitor_get_spec (monitor);
       if (gf_logical_monitor_configs_have_monitor (logical_monitor_configs,
                                                    monitor_spec))


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