# HG changeset patch # User Richard M. Stallman # Date 937623723 0 # Node ID d4de526fb0e0a9bd6d53c6574c75a17597fa6549 # Parent 4e71424cd40be383ad780a3e782e9560d53a0a97 (wm_delete_window): Check all the shell's children, not just the first, to find the dialog box. diff -r 4e71424cd40b -r d4de526fb0e0 lwlib/lwlib-Xaw.c --- a/lwlib/lwlib-Xaw.c Fri Sep 17 20:57:37 1999 +0000 +++ b/lwlib/lwlib-Xaw.c Sat Sep 18 03:02:03 1999 +0000 @@ -501,16 +501,22 @@ 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 ();