mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 12:36:51 +03:00
[project @ 2006-03-27 00:19:19 by dsilvers]
Defer scheduling a refresh until the content is loaded. This prevents assertion failures in the rare case that a schedule_run ends up being called before a content object containing a refresh which is due is fully loaded svn path=/import/netsurf/; revision=2193
This commit is contained in:
parent
9fd4526003
commit
dc3287127a
@ -291,6 +291,7 @@ void browser_window_callback(content_msg msg, struct content *c,
|
||||
c->url);
|
||||
url[sizeof url - 1] = 0;
|
||||
gui_window_set_url(bw->window, url);
|
||||
bw->refresh_interval = -1;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -366,6 +367,9 @@ void browser_window_callback(content_msg msg, struct content *c,
|
||||
hotlist_visited(c);
|
||||
free(bw->referer);
|
||||
bw->referer = 0;
|
||||
if (bw->refresh_interval != -1)
|
||||
schedule(bw->refresh_interval,
|
||||
browser_window_refresh, bw);
|
||||
break;
|
||||
|
||||
case CONTENT_MSG_ERROR:
|
||||
@ -455,8 +459,7 @@ void browser_window_callback(content_msg msg, struct content *c,
|
||||
#endif
|
||||
|
||||
case CONTENT_MSG_REFRESH:
|
||||
schedule(data.delay * 100,
|
||||
browser_window_refresh, bw);
|
||||
bw->refresh_interval = data.delay * 100;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -95,6 +95,9 @@ struct browser_window {
|
||||
|
||||
/** Current fetch is download */
|
||||
bool download;
|
||||
|
||||
/** Refresh interval (-1 if undefined) */
|
||||
int refresh_interval;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user