From b6d708865d80909caef61058126222cc656b6edd Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 25 Oct 2014 15:08:36 +0100 Subject: Use API to get window extents. --- beos/window.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'beos') diff --git a/beos/window.cpp b/beos/window.cpp index 5d4079f3b..522028be6 100644 --- a/beos/window.cpp +++ b/beos/window.cpp @@ -1072,6 +1072,7 @@ static void gui_window_set_scroll(struct gui_window *g, int sx, int sy) static void gui_window_update_extent(struct gui_window *g) { + nserror err; //CALLED(); if (browser_window_has_content(g->bw) == false) return; @@ -1081,8 +1082,12 @@ static void gui_window_update_extent(struct gui_window *g) if (!g->view->LockLooper()) return; - float x_max = content_get_width(g->bw->current_content) * g->scale /* - 1*/; - float y_max = content_get_height(g->bw->current_content) * g->scale /* - 1*/; + int x_max, y_max; + + err = browser_window_get_extents(g->bw, true, &x_max, &y_max); + if (err != NSERROR_OK) + return; + float x_prop = g->view->Bounds().Width() / x_max; float y_prop = g->view->Bounds().Height() / y_max; x_max -= g->view->Bounds().Width() + 1; -- cgit v1.2.3