monitor-manager: Always set current config when apply succeeds

No reason making any caller do it.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl 2017-02-24 17:09:19 +08:00
parent 1c54c7a1bb
commit 0952409de4

View File

@ -334,7 +334,12 @@ meta_monitor_manager_apply_monitors_config (MetaMonitorManager *manager,
MetaMonitorManagerClass *manager_class = MetaMonitorManagerClass *manager_class =
META_MONITOR_MANAGER_GET_CLASS (manager); META_MONITOR_MANAGER_GET_CLASS (manager);
return manager_class->apply_monitors_config (manager, config, method, error); if (!manager_class->apply_monitors_config (manager, config, method, error))
return FALSE;
meta_monitor_config_manager_set_current (manager->config_manager, config);
return TRUE;
} }
gboolean gboolean
@ -469,8 +474,6 @@ meta_monitor_manager_ensure_configured (MetaMonitorManager *manager)
} }
done: done:
meta_monitor_config_manager_set_current (manager->config_manager, config);
if (!config) if (!config)
{ {
meta_monitor_manager_apply_monitors_config (manager, meta_monitor_manager_apply_monitors_config (manager,