1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-25 10:47:00 +00:00

(wm_delete_window): Check all the shell's children,

not just the first, to find the dialog box.
This commit is contained in:
Richard M. Stallman 1999-09-18 03:02:03 +00:00
parent 8120f98902
commit 8dce2ddc9d

View File

@ -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 ();