aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1999-09-18 03:02:03 +0000
committerRichard M. Stallman1999-09-18 03:02:03 +0000
commit8dce2ddc9d5d2d7e52124365a8c0a488c3884f62 (patch)
tree0807c66707b9b2f54a6de1065f3552e206176f99
parent8120f989022ed9ba82eefa6723e484db9a1e1ccb (diff)
downloademacs-8dce2ddc9d5d2d7e52124365a8c0a488c3884f62.tar.gz
emacs-8dce2ddc9d5d2d7e52124365a8c0a488c3884f62.zip
(wm_delete_window): Check all the shell's children,
not just the first, to find the dialog box.
-rw-r--r--lwlib/lwlib-Xaw.c12
1 files 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)
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