summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-10-25 12:04:51 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-10-25 12:04:51 +0100
commit2bf36893bc7c97350ecb305679fea079f4a490f7 (patch)
treee04b1e2451dc0a85a8836bb2946680e3c25bd70f
parenteed2a97eca65f1b65faf85865d67171031653727 (diff)
downloadnetsurf-2bf36893bc7c97350ecb305679fea079f4a490f7.tar.gz
netsurf-2bf36893bc7c97350ecb305679fea079f4a490f7.tar.bz2
Use core browser window scrollbar type function instead of dereffing bw.
-rw-r--r--riscos/window.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/riscos/window.c b/riscos/window.c
index 45c05c6e6..04dce2a98 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -1491,6 +1491,8 @@ void ro_gui_window_open(wimp_open *open)
struct gui_window *g = (struct gui_window *)ro_gui_wimp_event_get_user_data(open->w);
int width = open->visible.x1 - open->visible.x0;
int height = open->visible.y1 - open->visible.y0;
+ browser_scrolling h_scroll;
+ browser_scrolling v_scroll;
int toolbar_height = 0;
float new_scale = 0;
wimp_window_state state;
@@ -1528,9 +1530,10 @@ void ro_gui_window_open(wimp_open *open)
state.yscroll = open->yscroll;
state.next = open->next;
+ browser_window_get_scrollbar_type(g->bw, &h_scroll, &v_scroll);
+
/* handle 'auto' scroll bars' and non-fitting scrollbar removal */
- if ((g->bw->scrolling == SCROLLING_AUTO) ||
- (g->bw->scrolling == SCROLLING_YES)) {
+ if ((h_scroll != BW_SCROLLING_NO) && (v_scroll != BW_SCROLLING_NO)) {
int size;
/* windows lose scrollbars when containing a frameset */