diff --git a/callbacks.c b/callbacks.c index 9a4b2a1..984c902 100644 --- a/callbacks.c +++ b/callbacks.c @@ -263,13 +263,13 @@ cb_password_dialog(GtkEntry* entry, zathura_password_dialog_info_t* dialog) g_free(input); } - g_idle_add(password_dialog, dialog); + gdk_threads_add_idle(password_dialog, dialog); return false; } /* try to open document again */ if (document_open(dialog->zathura, dialog->path, input) == false) { - g_idle_add(password_dialog, dialog); + gdk_threads_add_idle(password_dialog, dialog); } else { g_free(dialog->path); free(dialog); diff --git a/zathura.c b/zathura.c index b452dfd..1aed38e 100644 --- a/zathura.c +++ b/zathura.c @@ -244,7 +244,7 @@ zathura_init(int argc, char* argv[]) document_info->zathura = zathura; document_info->path = argv[1]; document_info->password = (argc >= 2) ? argv[2] : NULL; - g_idle_add(document_info_open, document_info); + gdk_threads_add_idle(document_info_open, document_info); } return zathura; @@ -537,7 +537,7 @@ page_set_delayed(zathura_t* zathura, unsigned int page_id) page_set_delayed_t* p = g_malloc(sizeof(page_set_delayed_t)); p->zathura = zathura; p->page = page_id; - g_idle_add(page_set_delayed_impl, p); + gdk_threads_add_idle(page_set_delayed_impl, p); return true; }