changeset 48927:148675770a17

(select_window_1): Undo 9/21 change.
author Richard M. Stallman <rms@gnu.org>
date Sun, 22 Dec 2002 21:57:05 +0000
parents fc0983df599f
children a9565e3d6e34
files src/window.c
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Sun Dec 22 21:09:20 2002 +0000
+++ b/src/window.c	Sun Dec 22 21:57:05 2002 +0000
@@ -2767,8 +2767,7 @@
 DEFUN ("select-window", Fselect_window, Sselect_window, 1, 1, 0,
        doc: /* Select WINDOW.  Most editing will apply to WINDOW's buffer.
 If WINDOW is not already selected, also make WINDOW's buffer current.
-If WINDOW's frame is the selected frame, also make WINDOW the frame's
-selected window.
+Also make WINDOW the frame's selected window.
 
 Note that the main editor command loop
 selects the buffer of the selected window before each command.  */)
@@ -2810,7 +2809,16 @@
 
   selected_window = window;
   sf = SELECTED_FRAME ();
-  if (XFRAME (WINDOW_FRAME (w)) == sf)
+  if (XFRAME (WINDOW_FRAME (w)) != sf)
+    {
+      XFRAME (WINDOW_FRAME (w))->selected_window = window;
+      /* Use this rather than Fhandle_switch_frame
+	 so that FRAME_FOCUS_FRAME is moved appropriately as we
+	 move around in the state where a minibuffer in a separate
+	 frame is active.  */
+      Fselect_frame (WINDOW_FRAME (w), Qnil);
+    }
+  else
     sf->selected_window = window;
 
   if (recordflag)