summaryrefslogtreecommitdiff
path: root/monkey
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-06-30 16:40:56 +0100
committerVincent Sanders <vince@kyllikki.org>2014-07-01 09:27:20 +0100
commit18aefabd20a16dda9ed5363088f0da5ada0d4431 (patch)
tree9447e1e0edb1d93b8ad575472e67bf7f844c5ca3 /monkey
parent06eb81235d975bc7721719d25ac114b4ab2c94da (diff)
downloadnetsurf-18aefabd20a16dda9ed5363088f0da5ada0d4431.tar.gz
netsurf-18aefabd20a16dda9ed5363088f0da5ada0d4431.tar.bz2
change reformat to be driven from the scheduler like redraw
Diffstat (limited to 'monkey')
-rw-r--r--monkey/browser.c19
-rw-r--r--monkey/poll.c5
2 files changed, 7 insertions, 17 deletions
diff --git a/monkey/browser.c b/monkey/browser.c
index e61d6deb3..0e488c578 100644
--- a/monkey/browser.c
+++ b/monkey/browser.c
@@ -64,19 +64,13 @@ monkey_find_window_by_content(hlcache_handle *content)
return ret;
}
-void
-monkey_window_process_reformats(void)
+
+/**
+ * callback from core to reformat a window.
+ */
+static void monkey_window_reformat(struct gui_window *gw)
{
- RING_ITERATE_START(struct gui_window, gw_ring, c_ring) {
- if (c_ring == NULL)
- RING_ITERATE_STOP(gw_ring, c_ring);
- if (c_ring->bw->reformat_pending) {
- browser_window_reformat(c_ring->bw,
- false,
- c_ring->width,
- c_ring->height);
- }
- } RING_ITERATE_END(gw_ring, c_ring);
+ browser_window_reformat(gw->bw, false, gw->width, gw->height);
}
void
@@ -511,6 +505,7 @@ static struct gui_window_table window_table = {
.set_scroll = gui_window_set_scroll,
.get_dimensions = gui_window_get_dimensions,
.update_extent = gui_window_update_extent,
+ .reformat = monkey_window_reformat,
.set_title = gui_window_set_title,
.set_url = gui_window_set_url,
diff --git a/monkey/poll.c b/monkey/poll.c
index d5b49f059..e65f2d3e2 100644
--- a/monkey/poll.c
+++ b/monkey/poll.c
@@ -126,11 +126,6 @@ monkey_poll(bool active)
schedule_run();
- if (browser_reformat_pending) {
- monkey_window_process_reformats();
- block = false;
- }
-
LOG(("Iterate %sblocking", block?"":"non-"));
if (block) {
fprintf(stdout, "GENERIC POLL BLOCKING\n");