comparison src/frame-x.c @ 375:a300bb07d72d r21-2b3

Import from CVS: tag r21-2b3
author cvs
date Mon, 13 Aug 2007 11:04:51 +0200
parents 6240c7796c7a
children 8626e4521993
comparison
equal deleted inserted replaced
374:4ebeb1a5388b 375:a300bb07d72d
2629 /* Destroy the X window of frame S. */ 2629 /* Destroy the X window of frame S. */
2630 static void 2630 static void
2631 x_delete_frame (struct frame *f) 2631 x_delete_frame (struct frame *f)
2632 { 2632 {
2633 Widget w = FRAME_X_SHELL_WIDGET (f); 2633 Widget w = FRAME_X_SHELL_WIDGET (f);
2634 Display *dpy = XtDisplay (w);
2634 2635
2635 #ifndef HAVE_SESSION 2636 #ifndef HAVE_SESSION
2636 if (FRAME_X_TOP_LEVEL_FRAME_P (f)) 2637 if (FRAME_X_TOP_LEVEL_FRAME_P (f))
2637 x_wm_maybe_move_wm_command (f); 2638 x_wm_maybe_move_wm_command (f);
2638 #endif /* HAVE_SESSION */ 2639 #endif /* HAVE_SESSION */
2639 2640
2640 #ifdef EXTERNAL_WIDGET 2641 #ifdef EXTERNAL_WIDGET
2641 { 2642 expect_x_error (dpy);
2642 Display *dpy = XtDisplay (w); 2643 /* for obscure reasons having (I think) to do with the internal
2643 expect_x_error (dpy); 2644 window-to-widget hierarchy maintained by Xt, we have to call
2644 /* for obscure reasons having (I think) to do with the internal 2645 XtUnrealizeWidget() here. Xt can really suck. */
2645 window-to-widget hierarchy maintained by Xt, we have to call 2646 if (f->being_deleted)
2646 XtUnrealizeWidget() here. Xt can really suck. */ 2647 XtUnrealizeWidget (w);
2647 if (f->being_deleted) 2648 XtDestroyWidget (w);
2648 XtUnrealizeWidget (w); 2649 x_error_occurred_p (dpy);
2649 XtDestroyWidget (w);
2650 x_error_occurred_p (dpy);
2651 }
2652 #else 2650 #else
2653 XtDestroyWidget (w); 2651 XtDestroyWidget (w);
2654 XFlush (XtDisplay(w)); /* make sure the windows are really gone! */ 2652 XFlush (dpy); /* make sure the windows are really gone! */
2655 #endif /* EXTERNAL_WIDGET */ 2653 #endif /* EXTERNAL_WIDGET */
2656 2654
2657 if (FRAME_X_GEOM_FREE_ME_PLEASE (f)) 2655 if (FRAME_X_GEOM_FREE_ME_PLEASE (f))
2658 xfree (FRAME_X_GEOM_FREE_ME_PLEASE (f)); 2656 xfree (FRAME_X_GEOM_FREE_ME_PLEASE (f));
2659 xfree (f->frame_data); 2657 xfree (f->frame_data);