comparison src/frame-x.c @ 396:6719134a07c2 r21-2-13

Import from CVS: tag r21-2-13
author cvs
date Mon, 13 Aug 2007 11:12:05 +0200
parents bbff43aa5eb7
children 74fd4e045ea6
comparison
equal deleted inserted replaced
395:de2c2a7459d2 396:6719134a07c2
2621 2621
2622 /* Destroy the X window of frame S. */ 2622 /* Destroy the X window of frame S. */
2623 static void 2623 static void
2624 x_delete_frame (struct frame *f) 2624 x_delete_frame (struct frame *f)
2625 { 2625 {
2626 Display *dpy;
2627
2626 #ifndef HAVE_SESSION 2628 #ifndef HAVE_SESSION
2627 if (FRAME_X_TOP_LEVEL_FRAME_P (f)) 2629 if (FRAME_X_TOP_LEVEL_FRAME_P (f))
2628 x_wm_maybe_move_wm_command (f); 2630 x_wm_maybe_move_wm_command (f);
2629 #endif /* HAVE_SESSION */ 2631 #endif /* HAVE_SESSION */
2630 2632
2631 #ifdef HAVE_CDE 2633 #ifdef HAVE_CDE
2632 DtDndDropUnregister (FRAME_X_TEXT_WIDGET (f)); 2634 DtDndDropUnregister (FRAME_X_TEXT_WIDGET (f));
2633 #endif /* HAVE_CDE */ 2635 #endif /* HAVE_CDE */
2634 2636
2635 assert (FRAME_X_SHELL_WIDGET (f) != 0); 2637 assert (FRAME_X_SHELL_WIDGET (f) != 0);
2638 dpy = XtDisplay (FRAME_X_SHELL_WIDGET (f));
2636 2639
2637 #ifdef EXTERNAL_WIDGET 2640 #ifdef EXTERNAL_WIDGET
2638 expect_x_error (XtDisplay (FRAME_X_SHELL_WIDGET (f))); 2641 expect_x_error (XtDisplay (FRAME_X_SHELL_WIDGET (f)));
2639 /* for obscure reasons having (I think) to do with the internal 2642 /* for obscure reasons having (I think) to do with the internal
2640 window-to-widget hierarchy maintained by Xt, we have to call 2643 window-to-widget hierarchy maintained by Xt, we have to call
2645 x_error_occurred_p (XtDisplay (FRAME_X_SHELL_WIDGET (f))); 2648 x_error_occurred_p (XtDisplay (FRAME_X_SHELL_WIDGET (f)));
2646 #else 2649 #else
2647 XtDestroyWidget (FRAME_X_SHELL_WIDGET (f)); 2650 XtDestroyWidget (FRAME_X_SHELL_WIDGET (f));
2648 /* make sure the windows are really gone! */ 2651 /* make sure the windows are really gone! */
2649 /* ### Is this REALLY necessary? */ 2652 /* ### Is this REALLY necessary? */
2650 XFlush (XtDisplay (FRAME_X_SHELL_WIDGET (f))); 2653 XFlush (dpy);
2651 #endif /* EXTERNAL_WIDGET */ 2654 #endif /* EXTERNAL_WIDGET */
2652 2655
2653 FRAME_X_SHELL_WIDGET (f) = 0; 2656 FRAME_X_SHELL_WIDGET (f) = 0;
2654 2657
2655 if (FRAME_X_GEOM_FREE_ME_PLEASE (f)) 2658 if (FRAME_X_GEOM_FREE_ME_PLEASE (f))