Lock the render thread while searching.

This is a temporary workaround because of issues in the poppler plugin. We
really need to introduce locking in the poppler plugin and remove the render
locks agains.

Closes: #253
This commit is contained in:
Sebastian Ramacher 2012-09-22 12:50:11 +02:00
parent 753a9f1781
commit 07fbbd514a

View file

@ -363,7 +363,10 @@ cmd_search(girara_session_t* session, const char* input, girara_argument_t* argu
GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
g_object_set(page_widget, "draw-links", FALSE, NULL);
render_lock(zathura->sync.render_thread);
girara_list_t* result = zathura_page_search_text(page, input, &error);
render_unlock(zathura->sync.render_thread);
if (result == NULL || girara_list_size(result) == 0) {
girara_list_free(result);
g_object_set(page_widget, "search-results", NULL, NULL);