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
This commit is contained in:
Jonas Ådahl 2017-06-14 18:40:53 +08:00
parent 4cc5b25493
commit 777963eeb6

View File

@ -471,7 +471,15 @@ meta_monitor_manager_apply_monitors_config (MetaMonitorManager *manager,
if (!manager_class->apply_monitors_config (manager, config, method, error)) if (!manager_class->apply_monitors_config (manager, config, method, error))
return FALSE; 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; return TRUE;
} }