monitor-config-store: Maybe force save configuration on tear down
If there is a pending config file content replacement in progress on tear down, cancel it and save it synchronously to avoid any data loss. https://bugzilla.gnome.org/show_bug.cgi?id=787477
This commit is contained in:
parent
7a1393ba26
commit
8b022a5595
@ -1434,6 +1434,14 @@ meta_monitor_config_store_dispose (GObject *object)
|
|||||||
{
|
{
|
||||||
MetaMonitorConfigStore *config_store = META_MONITOR_CONFIG_STORE (object);
|
MetaMonitorConfigStore *config_store = META_MONITOR_CONFIG_STORE (object);
|
||||||
|
|
||||||
|
if (config_store->save_cancellable)
|
||||||
|
{
|
||||||
|
g_cancellable_cancel (config_store->save_cancellable);
|
||||||
|
g_clear_object (&config_store->save_cancellable);
|
||||||
|
|
||||||
|
meta_monitor_config_store_save_sync (config_store);
|
||||||
|
}
|
||||||
|
|
||||||
g_clear_pointer (&config_store->configs, g_hash_table_destroy);
|
g_clear_pointer (&config_store->configs, g_hash_table_destroy);
|
||||||
|
|
||||||
g_clear_object (&config_store->user_file);
|
g_clear_object (&config_store->user_file);
|
||||||
|
Loading…
Reference in New Issue
Block a user