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 | 8dce2ddc9d5d2d7e52124365a8c0a488c3884f62 (patch) | |
tree | 0807c66707b9b2f54a6de1065f3552e206176f99 /lwlib/lwlib-Xaw.c | |
parent | 8120f989022ed9ba82eefa6723e484db9a1e1ccb (diff) | |
download | emacs-8dce2ddc9d5d2d7e52124365a8c0a488c3884f62.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 (); |