aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/frame.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c
index ea4c904e20a..46ac54d7677 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1576,8 +1576,14 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
1576 to a different window, the most recently used one, unless there is a 1576 to a different window, the most recently used one, unless there is a
1577 valid active minibuffer in the mini-window. */ 1577 valid active minibuffer in the mini-window. */
1578 if (EQ (f->selected_window, f->minibuffer_window) 1578 if (EQ (f->selected_window, f->minibuffer_window)
1579 /* The following test might fail if the mini-window contains a
1580 non-active minibuffer. */
1579 && NILP (Fminibufferp (XWINDOW (f->minibuffer_window)->contents, Qt))) 1581 && NILP (Fminibufferp (XWINDOW (f->minibuffer_window)->contents, Qt)))
1580 Fset_frame_selected_window (frame, call1 (Qget_mru_window, frame), Qnil); 1582 {
1583 Lisp_Object w = call1 (Qget_mru_window, frame);
1584 if (WINDOW_LIVE_P (w)) /* W can be nil in minibuffer-only frames. */
1585 Fset_frame_selected_window (frame, w, Qnil);
1586 }
1581 1587
1582 Fselect_window (f->selected_window, norecord); 1588 Fselect_window (f->selected_window, norecord);
1583 1589