Fix broken plotting on RO with locked contents and buffered rendering.
svn path=/trunk/netsurf/; revision=11667
This commit is contained in:
parent
22d4d640e8
commit
2d69afeec6
|
@ -124,6 +124,20 @@ bool browser_window_redraw(struct browser_window *bw, int x, int y,
|
|||
bw->scale, 0xFFFFFF);
|
||||
}
|
||||
|
||||
/* exported interface, documented in browser.h */
|
||||
bool browser_window_redraw_ready(struct browser_window *bw)
|
||||
{
|
||||
if (bw == NULL) {
|
||||
LOG(("NULL browser window"));
|
||||
return false;
|
||||
} else if (bw->current_content != NULL) {
|
||||
/* Can't render locked contents */
|
||||
return !content_is_locked(bw->current_content);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and open a new browser window with the given page.
|
||||
*
|
||||
|
|
|
@ -272,6 +272,14 @@ bool browser_window_stop_available(struct browser_window *bw);
|
|||
bool browser_window_redraw(struct browser_window *bw, int x, int y,
|
||||
struct rect clip);
|
||||
|
||||
/**
|
||||
* Check whether browser window is ready for redraw
|
||||
*
|
||||
* \param bw The window to redraw
|
||||
* \return true if browser window is ready for redraw
|
||||
*/
|
||||
bool browser_window_redraw_ready(struct browser_window *bw);
|
||||
|
||||
/* In platform specific hotlist.c. */
|
||||
void hotlist_visited(struct hlcache_handle *c);
|
||||
|
||||
|
|
|
@ -1442,6 +1442,12 @@ void ro_gui_window_redraw(wimp_draw *redraw)
|
|||
float scale = g->bw->scale;
|
||||
os_error *error;
|
||||
|
||||
/* We can't render locked contents. If the browser window is not
|
||||
* ready for redraw, do nothing. Else, in the case of buffered
|
||||
* rendering we'll show random data. */
|
||||
if (!browser_window_redraw_ready(g->bw))
|
||||
return;
|
||||
|
||||
plot = ro_plotters;
|
||||
ro_plot_set_scale(scale);
|
||||
ro_gui_current_redraw_gui = g;
|
||||
|
|
Loading…
Reference in New Issue