summaryrefslogtreecommitdiff
path: root/frontends/riscos
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-12-29 12:54:38 +0000
committerVincent Sanders <vince@kyllikki.org>2016-12-29 12:54:38 +0000
commite7598fb0b5c83fddca34d9f1adeb3c0989ce9ae5 (patch)
tree87d052452f77930d036c9f87b9cd0303aa6a851e /frontends/riscos
parent7b7b1507d01b3e078790150d6b5f59ebaf0b45c3 (diff)
downloadnetsurf-e7598fb0b5c83fddca34d9f1adeb3c0989ce9ae5.tar.gz
netsurf-e7598fb0b5c83fddca34d9f1adeb3c0989ce9ae5.tar.bz2
fix unexpected opening of windows in riscos
closed windows were re-opened in RISC OS because corewindow updates failed to take into account their current state when teh core updated the content size.
Diffstat (limited to 'frontends/riscos')
-rw-r--r--frontends/riscos/corewindow.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/frontends/riscos/corewindow.c b/frontends/riscos/corewindow.c
index fa42b8f64..9896069f8 100644
--- a/frontends/riscos/corewindow.c
+++ b/frontends/riscos/corewindow.c
@@ -742,7 +742,7 @@ ro_cw_update_size(struct core_window *cw, int width, int height)
LOG("content resize from w:%d h:%d to w:%d h:%d",
ro_cw->content_width, ro_cw->content_height, width, height);
- ro_cw->content_width = width;
+ ro_cw->content_width = width * 2;
ro_cw->content_height = -(2 * height);
state.w = ro_cw->wh;
@@ -753,13 +753,16 @@ ro_cw_update_size(struct core_window *cw, int width, int height)
return;
}
- open.w = ro_cw->wh;
- open.visible = state.visible;
- open.xscroll = state.xscroll;
- open.yscroll = state.yscroll;
- open.next = state.next;
+ /* only update the window if it is open */
+ if (state.flags & wimp_WINDOW_OPEN) {
+ open.w = ro_cw->wh;
+ open.visible = state.visible;
+ open.xscroll = state.xscroll;
+ open.yscroll = state.yscroll;
+ open.next = state.next;
- update_scrollbars(ro_cw, &open);
+ update_scrollbars(ro_cw, &open);
+ }
}