comparison lwlib/lwlib-Xaw.c @ 25754:d4de526fb0e0

(wm_delete_window): Check all the shell's children, not just the first, to find the dialog box.
author Richard M. Stallman <rms@gnu.org>
date Sat, 18 Sep 1999 03:02:03 +0000
parents ee40177f6c68
children e0d966fb548f
comparison
equal deleted inserted replaced
25753:4e71424cd40b 25754:d4de526fb0e0
499 Widget shell; 499 Widget shell;
500 XtPointer closure; 500 XtPointer closure;
501 XtPointer call_data; 501 XtPointer call_data;
502 { 502 {
503 LWLIB_ID id; 503 LWLIB_ID id;
504 Cardinal nkids;
505 int i;
504 Widget *kids = 0; 506 Widget *kids = 0;
505 Widget widget; 507 Widget widget;
506 if (! XtIsSubclass (shell, shellWidgetClass)) 508 if (! XtIsSubclass (shell, shellWidgetClass))
507 abort (); 509 abort ();
510 XtVaGetValues (shell, XtNnumChildren, &nkids, 0);
508 XtVaGetValues (shell, XtNchildren, &kids, 0); 511 XtVaGetValues (shell, XtNchildren, &kids, 0);
509 if (!kids || !*kids) 512 if (!kids || !*kids)
510 abort (); 513 abort ();
511 widget = kids [0]; 514 for (i = 0; i < nkids; i++)
512 if (! XtIsSubclass (widget, dialogWidgetClass)) 515 {
513 abort (); 516 widget = kids[i];
517 if (XtIsSubclass (widget, dialogWidgetClass))
518 break;
519 }
514 id = lw_get_widget_id (widget); 520 id = lw_get_widget_id (widget);
515 if (! id) abort (); 521 if (! id) abort ();
516 522
517 { 523 {
518 widget_info *info = lw_get_widget_info (id); 524 widget_info *info = lw_get_widget_info (id);