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.
This commit is contained in:
@ -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? */
|
||||
|
||||
Reference in New Issue
Block a user