mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-11 13:29:21 +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);
|
c->url);
|
||||||
url[sizeof url - 1] = 0;
|
url[sizeof url - 1] = 0;
|
||||||
gui_window_set_url(bw->window, url);
|
gui_window_set_url(bw->window, url);
|
||||||
|
bw->refresh_interval = -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -366,6 +367,9 @@ void browser_window_callback(content_msg msg, struct content *c,
|
|||||||
hotlist_visited(c);
|
hotlist_visited(c);
|
||||||
free(bw->referer);
|
free(bw->referer);
|
||||||
bw->referer = 0;
|
bw->referer = 0;
|
||||||
|
if (bw->refresh_interval != -1)
|
||||||
|
schedule(bw->refresh_interval,
|
||||||
|
browser_window_refresh, bw);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CONTENT_MSG_ERROR:
|
case CONTENT_MSG_ERROR:
|
||||||
@ -455,8 +459,7 @@ void browser_window_callback(content_msg msg, struct content *c,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case CONTENT_MSG_REFRESH:
|
case CONTENT_MSG_REFRESH:
|
||||||
schedule(data.delay * 100,
|
bw->refresh_interval = data.delay * 100;
|
||||||
browser_window_refresh, bw);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -95,6 +95,9 @@ struct browser_window {
|
|||||||
|
|
||||||
/** Current fetch is download */
|
/** Current fetch is download */
|
||||||
bool download;
|
bool download;
|
||||||
|
|
||||||
|
/** Refresh interval (-1 if undefined) */
|
||||||
|
int refresh_interval;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user