From b83f2c20b65208d27c55c4fb763aad829da6c350 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Wed, 27 Apr 2005 20:48:55 +0000 Subject: [PATCH] [project @ 2005-04-27 20:48:55 by rjw] Don't close when other windows are resized. svn path=/import/netsurf/; revision=1690 --- riscos/url_complete.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/riscos/url_complete.c b/riscos/url_complete.c index 6c63a3312..d8fa10bfe 100644 --- a/riscos/url_complete.c +++ b/riscos/url_complete.c @@ -321,10 +321,12 @@ void ro_gui_url_complete_resize(struct gui_window *g, wimp_open *open) { int lines; int scroll_v = 0; - /* if we the URL completion isn't for our window, or there is no toolbar, - * or there is no URL bar shown, or there are no URL matches, close it */ - if ((open->w != url_complete_parent) || (!g->toolbar) || - (!g->toolbar->display_url) || + /* only react to our window */ + if (open->w != url_complete_parent) + return; + /* if there is no toolbar, or there is no URL bar shown, or there are + * no URL matches, close it */ + if ((!g->toolbar) || (!g->toolbar->display_url) || (!url_complete_matches) || (url_complete_matches_available == 0)) { ro_gui_url_complete_close(NULL, 0); @@ -465,6 +467,13 @@ void ro_gui_url_complete_redraw(wimp_draw *redraw) { url_complete_icon.extent.x1 = 16384; url_complete_icon.data.indirected_text.validation = url_complete_icon_null; + /* no matches? no redraw */ + if (!url_complete_matches) { + LOG(("Attempt to redraw with no matches made")); + ro_gui_user_redraw(redraw, false, NULL); + return; + } + /* redraw */ more = wimp_redraw_window(redraw); while (more) {