summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-10-18 18:11:48 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-10-18 18:11:48 +0100
commit38cd1e1fd70b64d050b57d98175ddd153e2fe77f (patch)
tree8cf0693186dfb3867d277d7d30bd0411f89764e7
parent6d0746987d407f09d500557d9512850477687505 (diff)
downloadnetsurf-38cd1e1fd70b64d050b57d98175ddd153e2fe77f.tar.gz
netsurf-38cd1e1fd70b64d050b57d98175ddd153e2fe77f.tar.bz2
Replace a browser_window deref with browser_window_has_content()
-rw-r--r--riscos/window.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/riscos/window.c b/riscos/window.c
index b28db8074..a4e335831 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -1490,11 +1490,11 @@ void ro_gui_window_open(wimp_open *open)
int height = open->visible.y1 - open->visible.y0;
int toolbar_height = 0;
float new_scale = 0;
- hlcache_handle *h;
wimp_window_state state;
os_error *error;
wimp_w parent;
bits linkage;
+ bool have_content;
if (open->next == wimp_TOP && g->iconise_icon >= 0) {
/* window is no longer iconised, release its sprite number */
@@ -1502,7 +1502,7 @@ void ro_gui_window_open(wimp_open *open)
g->iconise_icon = -1;
}
- h = g->bw->current_content;
+ have_content = browser_window_has_content(g->bw);
/* get the current flags/nesting state */
state.w = g->window;
@@ -1542,7 +1542,7 @@ void ro_gui_window_open(wimp_open *open)
if (!(state.flags & wimp_WINDOW_HSCROLL)) {
height -= size;
state.visible.y0 += size;
- if (h) {
+ if (have_content) {
browser_window_schedule_reformat(g->bw);
}
}
@@ -1551,7 +1551,7 @@ void ro_gui_window_open(wimp_open *open)
if (state.flags & wimp_WINDOW_HSCROLL) {
height += size;
state.visible.y0 -= size;
- if (h) {
+ if (have_content) {
browser_window_schedule_reformat(g->bw);
}
}
@@ -1566,7 +1566,7 @@ void ro_gui_window_open(wimp_open *open)
if (!(state.flags & wimp_WINDOW_VSCROLL)) {
width -= size;
state.visible.x1 -= size;
- if (h) {
+ if (have_content) {
browser_window_schedule_reformat(g->bw);
}
}
@@ -1575,7 +1575,7 @@ void ro_gui_window_open(wimp_open *open)
if (state.flags & wimp_WINDOW_VSCROLL) {
width += size;
state.visible.x1 += size;
- if (h) {
+ if (have_content) {
browser_window_schedule_reformat(g->bw);
}
}
@@ -1584,7 +1584,8 @@ void ro_gui_window_open(wimp_open *open)
}
/* reformat or change extent if necessary */
- if ((h) && (g->old_width != width || g->old_height != height)) {
+ if (have_content &&
+ (g->old_width != width || g->old_height != height)) {
/* Ctrl-resize of a top-level window scales the content size */
if ((g->old_width > 0) && (g->old_width != width) &&
(ro_gui_ctrl_pressed()))