[mutter] monitor-manager: Don't set current config if only verifying



commit 777963eeb68fcc2539560b73a53394c26f467afe
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Jun 14 18:40:53 2017 +0800

    monitor-manager: Don't set current config if only verifying
    
    When verifying if a configuration is applicable, don't set it as
    current when applying succeeded, or else reverting to a previous
    configuration doesn't work after having verified.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765011

 src/backends/meta-monitor-manager.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index 4966b81..6ef0b0f 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -471,7 +471,15 @@ meta_monitor_manager_apply_monitors_config (MetaMonitorManager      *manager,
   if (!manager_class->apply_monitors_config (manager, config, method, error))
     return FALSE;
 
-  meta_monitor_config_manager_set_current (manager->config_manager, config);
+  switch (method)
+    {
+    case META_MONITORS_CONFIG_METHOD_TEMPORARY:
+    case META_MONITORS_CONFIG_METHOD_PERSISTENT:
+      meta_monitor_config_manager_set_current (manager->config_manager, config);
+      break;
+    case META_MONITORS_CONFIG_METHOD_VERIFY:
+      break;
+    }
 
   return TRUE;
 }


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