diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2011-01-07 12:12:47 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2011-01-07 12:12:47 +0000 |
commit | 72683554b469e55285332b08d459328461c3d7d9 (patch) | |
tree | 3aba4493cdd8ab9ae7da961df580be8bd528460f /render/favicon.c | |
parent | 68f8fa1059f75b8e3a5f0bcebd8844bc67b9a4e7 (diff) | |
download | netsurf-72683554b469e55285332b08d459328461c3d7d9.tar.gz netsurf-72683554b469e55285332b08d459328461c3d7d9.tar.bz2 |
Only consider a favicon for redraw/done if an event *caused* it to become ready
svn path=/trunk/netsurf/; revision=11239
Diffstat (limited to 'render/favicon.c')
-rw-r--r-- | render/favicon.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/render/favicon.c b/render/favicon.c index abab3eb7c..ba9c93f56 100644 --- a/render/favicon.c +++ b/render/favicon.c @@ -10,7 +10,7 @@ * * NetSurf is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License @@ -188,6 +188,7 @@ nserror favicon_callback(hlcache_handle *icon, const hlcache_event *event, void *pw) { struct content *c = pw; + bool consider_redraw = false; switch (event->type) { case CONTENT_MSG_LOADING: @@ -201,6 +202,7 @@ nserror favicon_callback(hlcache_handle *icon, hlcache_handle_release(icon); c->data.html.favicon = NULL; c->active -= 1; + consider_redraw = true; content_add_error(c, "NotFavIco", 0); @@ -213,6 +215,7 @@ nserror favicon_callback(hlcache_handle *icon, break; case CONTENT_MSG_DONE: c->active -= 1; + consider_redraw = true; break; case CONTENT_MSG_ERROR: @@ -224,6 +227,7 @@ nserror favicon_callback(hlcache_handle *icon, content_add_error(c, "?", 0); c->active -= 1; + consider_redraw = true; break; case CONTENT_MSG_STATUS: @@ -241,7 +245,7 @@ nserror favicon_callback(hlcache_handle *icon, assert(0); } - if (c->active == 0) { + if (consider_redraw && (c->active == 0)) { /* all objects have arrived */ content__reformat(c, c->available_width, c->height); html_set_status(c, ""); |