From 2bf36893bc7c97350ecb305679fea079f4a490f7 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 25 Oct 2014 12:04:51 +0100 Subject: Use core browser window scrollbar type function instead of dereffing bw. --- riscos/window.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'riscos') 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 */ -- cgit v1.2.3