diff options
author | Alexander Larsson <alexl@redhat.com> | 2011-03-25 10:53:05 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2011-03-28 12:49:17 +0200 |
commit | e274dbbdced7f3f8e6349bdfadcd743326cfa799 (patch) | |
tree | c0fea71a27490754c6dcf34b54e1ead9334ead5a /gtk/gtkfilesystemmodel.c | |
parent | f5e03849391cd602420aa06fdb449741b8aa75bd (diff) | |
download | gtk+-e274dbbdced7f3f8e6349bdfadcd743326cfa799.tar.gz |
Ensure we always grab the gdk lock in async callbacks
Async callbacks are delivered in idles, so we need to make sure
we get the gdk lock before calling any gdk/gtk stuff. This was
missing in a few places.
Diffstat (limited to 'gtk/gtkfilesystemmodel.c')
-rw-r--r-- | gtk/gtkfilesystemmodel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c index c6532c136f..92f44ddbf4 100644 --- a/gtk/gtkfilesystemmodel.c +++ b/gtk/gtkfilesystemmodel.c @@ -1149,7 +1149,9 @@ gtk_file_system_model_query_done (GObject * object, if (info == NULL) return; + gdk_threads_enter (); _gtk_file_system_model_update_file (model, file, info, TRUE); + gdk_threads_leave (); } static void @@ -1174,7 +1176,9 @@ gtk_file_system_model_monitor_change (GFileMonitor * monitor, model); break; case G_FILE_MONITOR_EVENT_DELETED: + gdk_threads_enter (); remove_file (model, file); + gdk_threads_leave (); break; case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: /* FIXME: use freeze/thaw with this somehow? */ |