From e7598fb0b5c83fddca34d9f1adeb3c0989ce9ae5 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 29 Dec 2016 12:54:38 +0000 Subject: 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. --- frontends/riscos/corewindow.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'frontends') 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); + } } -- cgit v1.2.3