From 8dce2ddc9d5d2d7e52124365a8c0a488c3884f62 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 18 Sep 1999 03:02:03 +0000 Subject: [PATCH] (wm_delete_window): Check all the shell's children, not just the first, to find the dialog box. --- lwlib/lwlib-Xaw.c | 12 +++++++++--- 1 file 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 (); -- 2.39.5