summaryrefslogtreecommitdiff
path: root/beos/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'beos/window.cpp')
-rw-r--r--beos/window.cpp9
1 files changed, 7 insertions, 2 deletions
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;