[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
This commit is contained in:
James Bursa 2006-03-25 20:13:51 +00:00
parent c7c7cb7e49
commit 016128c37d
1 changed files with 11 additions and 1 deletions

View File

@ -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);
}