diff options
Diffstat (limited to 'render/search.c')
-rw-r--r-- | render/search.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/render/search.c b/render/search.c index 70ff3337e..d30c43f11 100644 --- a/render/search.c +++ b/render/search.c @@ -30,7 +30,6 @@ #include "content/content.h" #include "content/hlcache.h" -#include "desktop/browser.h" #include "desktop/gui.h" #include "desktop/selection.h" #include "render/box.h" @@ -76,26 +75,6 @@ struct search_context { /** - * Find the browser window that contains the content associated with a search - * - * \param search search context - * \return the browser window, or NULL if none - */ -static struct browser_window *search_get_browser_window( - struct search_context *search) -{ - if (search->c != NULL) { - if (search->is_html == true) { - return html_get_browser_window(search->c); - } else { - return textplain_get_browser_window(search->c); - } - } - return NULL; -} - - -/** * create a search_context * \param h the hlcache_handle the search_context is connected to * \param callbacks the callbacks to modify appearance according to results @@ -722,13 +701,11 @@ void search_destroy_context(struct search_context *context) { assert(context != NULL); - if (context->c != NULL) { - struct browser_window *bw = search_get_browser_window(context); + if (context->callbacks.invalidate != NULL) { + context->callbacks.invalidate(context, context->callbacks.p); + } - /* TODO: don't poke inside bw */ - if (bw->cur_search == context) { - bw->cur_search = NULL; - } + if (context->c != NULL) { if (context->is_html) html_set_search(context->c, NULL); |