changeset 1809:69b3ee873a9b

* frame.c (Fdelete_frame): Clear the frame's display after calling the window-system-dependent frame destruction routine. We no longer need to pass the display as a separate argument to x_destroy_window. * xterm.c (x_destroy_window): Put the code which clears out f's display here, right after we free the storage it points to. Put everything, including the code which clears x_focus_frame and x_highlight_frame, inside the BLOCK/UNBLOCK_INPUT pair. * frame.c (Fdelete_frame): Clear the frame's display after calling the window-system-dependent frame destruction routine. We no longer need to pass the display as a separate argument to x_destroy_window. * xterm.c (x_destroy_window): Put the code which clears out f's display here, right after we free the storage it points to. Put everything, including the code which clears x_focus_frame and x_highlight_frame, inside the BLOCK/UNBLOCK_INPUT pair.
author Jim Blandy <jimb@redhat.com>
date Fri, 22 Jan 1993 02:45:16 +0000
parents 60685747963c
children bf618128d973
files src/frame.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Thu Jan 21 22:43:16 1993 +0000
+++ b/src/frame.c	Fri Jan 22 02:45:16 1993 +0000
@@ -593,7 +593,6 @@
      Lisp_Object frame;
 {
   struct frame *f;
-  union display displ;
 
   if (EQ (frame, Qnil))
     {
@@ -654,14 +653,19 @@
 
   Vframe_list = Fdelq (frame, Vframe_list);
   FRAME_SET_VISIBLE (f, 0);
-  displ = f->display;
-  f->display.nothing = 0;
 
+  /* Since some events are handled at the interrupt level, we may get
+     an event for f at any time; if we zero out the frame's display
+     now, then we may trip up the event-handling code.  Instead, we'll
+     promise that the display of the frame must be valid until we have
+     called the window-system-dependent frame destruction routine.  */
 #ifdef HAVE_X_WINDOWS
   if (FRAME_X_P (f))
-    x_destroy_window (f, displ);
+    x_destroy_window (f);
 #endif
 
+  f->display.nothing = 0;
+
   /* If we've deleted the last_nonminibuf_frame, then try to find
      another one.  */
   if (f == last_nonminibuf_frame)