X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fframe-x.c;fp=src%2Fframe-x.c;h=a5d62c6fd9b85a5842edf9725fd12a77999c748c;hp=4011bdbe1d53256fe334179b65848475a9c01304;hb=cb9f6f4eadc44f1becb32cbbd1db26449e347755;hpb=7e7e32d8c43ebad1d3e115269d251075abbfdf91 diff --git a/src/frame-x.c b/src/frame-x.c index 4011bdb..a5d62c6 100644 --- a/src/frame-x.c +++ b/src/frame-x.c @@ -2632,25 +2632,25 @@ x_delete_frame (struct frame *f) DtDndDropUnregister (FRAME_X_TEXT_WIDGET (f)); #endif /* HAVE_CDE */ - assert (FRAME_X_SHELL_WIDGET (f)); - if (FRAME_X_SHELL_WIDGET (f)) - { - Display *dpy = XtDisplay (FRAME_X_SHELL_WIDGET (f)); - expect_x_error (dpy); - /* for obscure reasons having (I think) to do with the internal - window-to-widget hierarchy maintained by Xt, we have to call - XtUnrealizeWidget() here. Xt can really suck. */ - if (f->being_deleted) - XtUnrealizeWidget (FRAME_X_SHELL_WIDGET (f)); - XtDestroyWidget (FRAME_X_SHELL_WIDGET (f)); - x_error_occurred_p (dpy); - - /* make sure the windows are really gone! */ - /* ### Is this REALLY necessary? */ - XFlush (dpy); - - FRAME_X_SHELL_WIDGET (f) = 0; - } + assert (FRAME_X_SHELL_WIDGET (f) != 0); + +#ifdef EXTERNAL_WIDGET + expect_x_error (XtDisplay (FRAME_X_SHELL_WIDGET (f))); + /* for obscure reasons having (I think) to do with the internal + window-to-widget hierarchy maintained by Xt, we have to call + XtUnrealizeWidget() here. Xt can really suck. */ + if (f->being_deleted) + XtUnrealizeWidget (FRAME_X_SHELL_WIDGET (f)); + XtDestroyWidget (FRAME_X_SHELL_WIDGET (f)); + x_error_occurred_p (XtDisplay (FRAME_X_SHELL_WIDGET (f))); +#else + XtDestroyWidget (FRAME_X_SHELL_WIDGET (f)); + /* make sure the windows are really gone! */ + /* ### Is this REALLY necessary? */ + XFlush (XtDisplay (FRAME_X_SHELL_WIDGET (f))); +#endif /* EXTERNAL_WIDGET */ + + FRAME_X_SHELL_WIDGET (f) = 0; if (FRAME_X_GEOM_FREE_ME_PLEASE (f)) {