changeset 8536:b97057eb17d3

(window_loop, case UNSHOW_BUFFER): When we delete a frame, skip all the windows on that frame.
author Richard M. Stallman <rms@gnu.org>
date Sat, 13 Aug 1994 23:13:10 +0000
parents 8819276a0458
children fcddf3261917
files src/window.c
diffstat 1 files changed, 20 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Sat Aug 13 20:35:42 1994 +0000
+++ b/src/window.c	Sat Aug 13 23:13:10 1994 +0000
@@ -1337,7 +1337,26 @@
 		if (EQ (w, FRAME_ROOT_WINDOW (f))
 		    && !NILP (XWINDOW (w)->dedicated)
 		    && other_visible_frames (f))
-		  Fdelete_frame (WINDOW_FRAME (XWINDOW (w)), Qnil);
+		  {
+		    /* Skip the other windows on this frame.
+		       There might be one, the minibuffer!  */
+		    if (! EQ (w, last_window))
+		      while (f == XFRAME (WINDOW_FRAME (XWINDOW (next_window))))
+			{
+			  /* As we go, check for the end of the loop.
+			     We mustn't start going around a second time.  */
+			  if (EQ (next_window, last_window))
+			    {
+			      last_window = w;
+			      break;
+			    }
+			  next_window = Fnext_window (next_window,
+						      mini ? Qt : Qnil,
+						      frame_arg);
+			}
+		    /* Now we can safely delete the frame.  */
+		    Fdelete_frame (WINDOW_FRAME (XWINDOW (w)), Qnil);
+		  }
 		else
 #endif
 		  {