From b077f1548584325417f360160e9ffc00759e6dce Mon Sep 17 00:00:00 2001 From: Steve Fryatt Date: Mon, 21 Feb 2011 23:50:40 +0000 Subject: Reduce redraw flicker when changing URL bar extent. svn path=/trunk/netsurf/; revision=11752 --- riscos/gui/url_bar.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'riscos/gui') diff --git a/riscos/gui/url_bar.c b/riscos/gui/url_bar.c index df4e7c06c..4a3b4b232 100644 --- a/riscos/gui/url_bar.c +++ b/riscos/gui/url_bar.c @@ -235,15 +235,18 @@ bool ro_gui_url_bar_set_extent(struct url_bar *url_bar, /* Redraw the relevant bits of the toolbar. */ - if (url_bar->window != NULL && url_bar->container_icon != -1) { - xwimp_force_redraw(url_bar->window, - url_bar->extent.x0 + - (stretch) ? URLBAR_FAVICON_WIDTH : 0, - url_bar->extent.y0, + if (url_bar->window != NULL && !url_bar->hidden) { + if (stretch) { + xwimp_force_redraw(url_bar->window, + x0 + URLBAR_FAVICON_WIDTH, y0, + (x1 > url_bar->extent.x1) ? + x1 : url_bar->extent.x1, y1); + } else { + xwimp_force_redraw(url_bar->window, + url_bar->extent.x0, url_bar->extent.y0, url_bar->extent.x1, url_bar->extent.y1); - xwimp_force_redraw(url_bar->window, - x0 + (stretch) ? URLBAR_FAVICON_WIDTH : 0, - y0, x1, y1); + xwimp_force_redraw(url_bar->window, x0, y0, x1, y1); + } } /* Reposition the URL bar icons. */ -- cgit v1.2.3