diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-02-08 16:05:58 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-02-08 16:05:58 +0000 |
commit | a505ea49dfd42f7196f64bf8bc4cb957ac1a9b35 (patch) | |
tree | 636f579bb82baeb7826102f7a12c9c0e55fdc2a9 /gtk/window.c | |
parent | 22d15380f40b82f7d1660648ec13af094643a3ca (diff) | |
download | netsurf-a505ea49dfd42f7196f64bf8bc4cb957ac1a9b35.tar.gz |
Use browser_window_get_extents function.
Diffstat (limited to 'gtk/window.c')
-rw-r--r-- | gtk/window.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gtk/window.c b/gtk/window.c index 0a2c1aa02..82359adbf 100644 --- a/gtk/window.c +++ b/gtk/window.c @@ -992,12 +992,11 @@ static void gui_window_set_scroll(struct gui_window *g, int sx, int sy) static void gui_window_update_extent(struct gui_window *g) { - if (!browser_window_has_content(g->bw)) - return; + int w, h; - gtk_layout_set_size(g->layout, - content_get_width(g->bw->current_content) * g->bw->scale, - content_get_height(g->bw->current_content) * g->bw->scale); + if (browser_window_get_extents(g->bw, true, &w, &h) == NSERROR_OK) { + gtk_layout_set_size(g->layout, w, h); + } } static GdkCursor *nsgtk_create_menu_cursor(void) |