diff options
author | Richard M. Stallman <rms@gnu.org> | 1999-09-18 03:02:03 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1999-09-18 03:02:03 +0000 |
commit | cc4018e04f587c3b7b31c965d680c9df2a8411fe (patch) | |
tree | a52aaeb661caf993e899f526be9e2903937ab3a7 /lwlib/lwlib-Xaw.c | |
parent | 0377bb7e59082f883836ef2f974be9ca8e84aba9 (diff) | |
download | emacs-cc4018e04f587c3b7b31c965d680c9df2a8411fe.tar.gz |
(wm_delete_window): Check all the shell's children,
not just the first, to find the dialog box.
Diffstat (limited to 'lwlib/lwlib-Xaw.c')
-rw-r--r-- | lwlib/lwlib-Xaw.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c index 21685659ae5..e56a11c265a 100644 --- a/lwlib/lwlib-Xaw.c +++ b/lwlib/lwlib-Xaw.c @@ -501,16 +501,22 @@ wm_delete_window (shell, closure, call_data) XtPointer call_data; { LWLIB_ID id; + Cardinal nkids; + int i; Widget *kids = 0; Widget widget; if (! XtIsSubclass (shell, shellWidgetClass)) abort (); + XtVaGetValues (shell, XtNnumChildren, &nkids, 0); XtVaGetValues (shell, XtNchildren, &kids, 0); if (!kids || !*kids) abort (); - widget = kids [0]; - if (! XtIsSubclass (widget, dialogWidgetClass)) - abort (); + for (i = 0; i < nkids; i++) + { + widget = kids[i]; + if (XtIsSubclass (widget, dialogWidgetClass)) + break; + } id = lw_get_widget_id (widget); if (! id) abort (); |