summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-02-08 20:07:00 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-02-08 20:07:00 +0000
commit6ccf13839b86f9af6c67c252d040741d13ed9c01 (patch)
tree59e1cb21ffa0b46856b11af5d65ba5eea422a3bd /riscos
parent5e495f0ab973d6fb7b5b209b6cd8a8684358bf46 (diff)
downloadnetsurf-6ccf13839b86f9af6c67c252d040741d13ed9c01.tar.gz
netsurf-6ccf13839b86f9af6c67c252d040741d13ed9c01.tar.bz2
Use API to get extents.
Diffstat (limited to 'riscos')
-rw-r--r--riscos/window.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/riscos/window.c b/riscos/window.c
index 88e2ffd19..83fa1eed9 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -1320,11 +1320,9 @@ void gui_window_set_extent(struct gui_window *g, int width, int height)
{
int screen_width;
int toolbar_height = 0;
- hlcache_handle *h;
wimp_window_state state;
os_error *error;
- h = g->bw->current_content;
if (g->toolbar)
toolbar_height = ro_toolbar_full_height(g->toolbar);
@@ -1356,9 +1354,11 @@ void gui_window_set_extent(struct gui_window *g, int width, int height)
height -= ro_get_hscroll_height(g->window);
height -= ro_get_title_height(g->window);
}
- if (h) {
- width = max(width, content_get_width(h) * 2 * g->bw->scale);
- height = max(height, content_get_height(h) * 2 * g->bw->scale);
+ if (browser_window_has_content(g->bw)) {
+ int w, h;
+ browser_window_get_extents(g->bw, true, &w, &h);
+ width = max(width, w * 2);
+ height = max(height, h * 2);
}
os_box extent = { 0, -height, width, toolbar_height };
error = xwimp_set_extent(g->window, &extent);