diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/frame.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c index dc8045f41e6..0c278259a79 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1568,8 +1568,14 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor | |||
| 1568 | to a different window, the most recently used one, unless there is a | 1568 | to a different window, the most recently used one, unless there is a |
| 1569 | valid active minibuffer in the mini-window. */ | 1569 | valid active minibuffer in the mini-window. */ |
| 1570 | if (EQ (f->selected_window, f->minibuffer_window) | 1570 | if (EQ (f->selected_window, f->minibuffer_window) |
| 1571 | /* The following test might fail if the mini-window contains a | ||
| 1572 | non-active minibuffer. */ | ||
| 1571 | && NILP (Fminibufferp (XWINDOW (f->minibuffer_window)->contents, Qt))) | 1573 | && NILP (Fminibufferp (XWINDOW (f->minibuffer_window)->contents, Qt))) |
| 1572 | Fset_frame_selected_window (frame, call1 (Qget_mru_window, frame), Qnil); | 1574 | { |
| 1575 | Lisp_Object w = call1 (Qget_mru_window, frame); | ||
| 1576 | if (WINDOW_LIVE_P (w)) /* W can be nil in minibuffer-only frames. */ | ||
| 1577 | Fset_frame_selected_window (frame, w, Qnil); | ||
| 1578 | } | ||
| 1573 | 1579 | ||
| 1574 | Fselect_window (f->selected_window, norecord); | 1580 | Fselect_window (f->selected_window, norecord); |
| 1575 | 1581 | ||