* window.c (Fset_window_configuration): Don't select the frame
authorJim Blandy <jimb@redhat.com>
Wed, 30 Sep 1992 14:28:46 +0000 (14:28 +0000)
committerJim Blandy <jimb@redhat.com>
Wed, 30 Sep 1992 14:28:46 +0000 (14:28 +0000)
just because we restored its configuration.

* window.c (Fset_window_configuration): Don't forget to set the
frame's selected window when we can't call Fselect_window.

src/window.c

index f11fed9..cbf4d0f 100644 (file)
@@ -2486,10 +2486,17 @@ by `current-window-configuration' (which see).")
     }
 
   FRAME_ROOT_WINDOW (f) = data->root_window;
+  /* We also need to restore the frame's selected window; that's taken
+     care of below, either by calling Fselect_window, or by explicit
+     assignment.  */
 
+#if 0  /* I don't understand why this is needed, and it causes
+         problems when the frame's old selected window has been
+         deleted.  */
 #ifdef MULTI_FRAME
   if (f != selected_frame && ! FRAME_TERMCAP_P (f))
     Fselect_frame (WINDOW_FRAME (XWINDOW (data->root_window)), Qnil);
+#endif
 #endif
 
   /* Set the screen height to the value it had before this function.  */
@@ -2504,6 +2511,8 @@ by `current-window-configuration' (which see).")
       else
        Fset_buffer (XWINDOW (selected_window)->buffer);
     }
+  else
+    FRAME_SELECTED_WINDOW (f) = data->current_window;
 
   Vminibuf_scroll_window = data->minibuf_scroll_window;
   return (Qnil);