From: Richard M. Stallman Date: Sat, 18 Sep 1999 03:02:03 +0000 (+0000) Subject: (wm_delete_window): Check all the shell's children, X-Git-Tag: emacs-pretest-21.0.90~6688 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8dce2ddc9d5d2d7e52124365a8c0a488c3884f62;p=emacs.git (wm_delete_window): Check all the shell's children, not just the first, to find the dialog box. --- 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 ();