diff options
-rw-r--r-- | src/frame.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/frame.c b/src/frame.c index e393e597e0a..7184c20b797 100644 --- a/src/frame.c +++ b/src/frame.c @@ -593,7 +593,6 @@ A frame may not be deleted if its minibuffer is used by other frames.") Lisp_Object frame; { struct frame *f; - union display displ; if (EQ (frame, Qnil)) { @@ -654,14 +653,19 @@ A frame may not be deleted if its minibuffer is used by other frames.") 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) |