summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2020-12-11 15:18:18 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2020-12-23 01:44:34 +0000
commit10def41dc5a7848c8cd63ea731da3f46ed49ccdc (patch)
tree79a159d95381a790e298c151af57fcaf42d04047 /gio
parent4c3a61e2214e39caf54c6ab4d08fd13e505f08e3 (diff)
downloadglib-10def41dc5a7848c8cd63ea731da3f46ed49ccdc.tar.gz
GWin32AppInfo: simplify appinfo wait condition
Diffstat (limited to 'gio')
-rw-r--r--gio/gwin32appinfo.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gio/gwin32appinfo.c b/gio/gwin32appinfo.c
index 57e63c7bb..9544719b8 100644
--- a/gio/gwin32appinfo.c
+++ b/gio/gwin32appinfo.c
@@ -3802,17 +3802,11 @@ gio_win32_appinfo_init (gboolean do_wait)
if (!do_wait)
return;
- /* If any of the keys had a change, then we've already initiated
- * a tree re-build in keys_updated(). Just wait for it to finish.
+ /* Previously, we checked each of the watched keys here.
+ * Now we just look at the update counter, because each key
+ * has a change callback keys_updated, which increments this counter.
*/
- if ((url_associations_key && g_win32_registry_key_has_changed (url_associations_key)) ||
- (file_exts_key && g_win32_registry_key_has_changed (file_exts_key)) ||
- (user_clients_key && g_win32_registry_key_has_changed (user_clients_key)) ||
- (system_clients_key && g_win32_registry_key_has_changed (system_clients_key)) ||
- (applications_key && g_win32_registry_key_has_changed (applications_key)) ||
- (user_registered_apps_key && g_win32_registry_key_has_changed (user_registered_apps_key)) ||
- (system_registered_apps_key && g_win32_registry_key_has_changed (system_registered_apps_key)) ||
- (classes_root_key && g_win32_registry_key_has_changed (classes_root_key)))
+ if (g_atomic_int_get (&gio_win32_appinfo_update_counter) > 0)
{
g_mutex_lock (&gio_win32_appinfo_mutex);
while (g_atomic_int_get (&gio_win32_appinfo_update_counter) > 0)