diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2004-07-16 16:33:45 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2004-07-16 16:33:45 +0000 |
commit | abaa8a90938024685d39a10192586d369e44a101 (patch) | |
tree | 59006e5f7f679a9bd76b3488e20582b3e4af733c /riscos/dialog.c | |
parent | 99d1c18252833c577dc5046e73ef7f7cc12bdb3a (diff) | |
download | netsurf-abaa8a90938024685d39a10192586d369e44a101.tar.gz netsurf-abaa8a90938024685d39a10192586d369e44a101.tar.bz2 |
[project @ 2004-07-16 16:33:44 by rjw]
Various fixes for the GUI. Persistant windows are closed when upon a change of content. Hotlist saves in the same format as !Browse. Neater login window. Support for interactive help from hotlist windows.
svn path=/import/netsurf/; revision=1081
Diffstat (limited to 'riscos/dialog.c')
-rw-r--r-- | riscos/dialog.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/riscos/dialog.c b/riscos/dialog.c index 4823e7b5a..b3c915035 100644 --- a/riscos/dialog.c +++ b/riscos/dialog.c @@ -224,18 +224,19 @@ void ro_gui_dialog_open(wimp_w w) /** * Open a persistant dialog box relative to the pointer. * - * \param parent the owning window (NULL for no owner) - * \param w the dialog window + * \param parent the owning window (NULL for no owner) + * \param w the dialog window + * \param pointer open the window at the pointer (centre of the parent otherwise) */ -void ro_gui_dialog_open_persistant(wimp_w parent, wimp_w w) { +void ro_gui_dialog_open_persistant(wimp_w parent, wimp_w w, bool pointer) { int dx, dy, i; - wimp_pointer pointer; + wimp_pointer ptr; wimp_window_state open; os_error *error; /* Get the pointer position */ - error = xwimp_get_pointer_info(&pointer); + error = xwimp_get_pointer_info(&ptr); if (error) { LOG(("xwimp_get_pointer_info: 0x%x: %s\n", error->errnum, error->errmess)); @@ -245,16 +246,20 @@ void ro_gui_dialog_open_persistant(wimp_w parent, wimp_w w) { /* Move and open */ - open.w = w; - wimp_get_window_state(&open); - dx = (open.visible.x1 - open.visible.x0); - dy = (open.visible.y1 - open.visible.y0); - open.visible.x0 = pointer.pos.x - 64; - open.visible.x1 = pointer.pos.x - 64 + dx; - open.visible.y0 = pointer.pos.y - dy; - open.visible.y1 = pointer.pos.y; - open.next = wimp_TOP; - wimp_open_window((wimp_open *) &open); + if (pointer) { + open.w = w; + wimp_get_window_state(&open); + dx = (open.visible.x1 - open.visible.x0); + dy = (open.visible.y1 - open.visible.y0); + open.visible.x0 = ptr.pos.x - 64; + open.visible.x1 = ptr.pos.x - 64 + dx; + open.visible.y0 = ptr.pos.y - dy; + open.visible.y1 = ptr.pos.y; + open.next = wimp_TOP; + wimp_open_window((wimp_open *) &open); + } else { + ro_gui_open_window_centre(parent, w); + } /* Set the caret position */ |