diff options
author | James Bursa <james@netsurf-browser.org> | 2006-03-25 20:13:51 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2006-03-25 20:13:51 +0000 |
commit | 016128c37dc80b26851870d72d329f0579423ece (patch) | |
tree | 1685e419c24bf63b8a66a74074642647b5dc93c5 /riscos | |
parent | c7c7cb7e49ddb8b4bf0d0e6e0b9f41eb5cbcad1b (diff) | |
download | netsurf-016128c37dc80b26851870d72d329f0579423ece.tar.gz netsurf-016128c37dc80b26851870d72d329f0579423ece.tar.bz2 |
[project @ 2006-03-25 20:13:51 by bursa]
Make dialogs open fully on screen even if they are already open.
svn path=/import/netsurf/; revision=2163
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/dialog.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/riscos/dialog.c b/riscos/dialog.c index 3a5225e8b..f2e394f40 100644 --- a/riscos/dialog.c +++ b/riscos/dialog.c @@ -506,9 +506,19 @@ void ro_gui_dialog_open_at_pointer(wimp_w w) state.visible.y0 = ptr.pos.y - dy; state.visible.y1 = ptr.pos.y; + /* if the window is already open, close it first so that it opens fully + * on screen */ + error = xwimp_close_window(w); + if (error) { + LOG(("xwimp_close_window: 0x%x: %s", + error->errnum, error->errmess)); + warn_user("WimpError", error->errmess); + return; + } + /* open the window at the top of the stack */ state.next = wimp_TOP; - ro_gui_open_window_request((wimp_open*)&state); + ro_gui_open_window_request((wimp_open *) &state); } |