X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=inline;f=lwlib%2Flwlib-Xaw.c;h=2fe4dc9cefbcbcb9fc966de98ed57240c275b5de;hb=096307f5ab2ee53e50d94562e1eadb6966fcaa40;hp=a52b23111bc4ee50540a42e537f4785992de3f67;hpb=3d56384ee19b7100737ea37a313ee8fcffd0dbcb;p=chise%2Fxemacs-chise.git- diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c index a52b231..2fe4dc9 100644 --- a/lwlib/lwlib-Xaw.c +++ b/lwlib/lwlib-Xaw.c @@ -597,11 +597,14 @@ wm_delete_window (Widget shell, XtPointer closure, XtPointer call_data) abort (); XtSetArg (al [0], XtNchildren, &kids); XtGetValues (shell, al, 1); - if (!kids || !*kids) - abort (); - widget = kids [0]; - if (! XtIsSubclass (widget, dialogWidgetClass)) - abort (); + if (!kids || !*kids) abort (); + + for (widget = *kids; + widget && ! XtIsSubclass (widget, dialogWidgetClass); + widget = *++kids) + ; + if (!widget) abort (); + id = lw_get_widget_id (widget); if (! id) abort ();