Lisp_Object frame, force;
{
struct frame *f;
+ int minibuffer_selected;
if (EQ (frame, Qnil))
{
}
}
+ minibuffer_selected = EQ (minibuf_window, selected_window);
+
/* Don't let the frame remain selected. */
if (f == selected_frame)
Fhandle_switch_frame (next_frame (frame, Qt), Qnil);
Fset_window_buffer (selected_frame->minibuffer_window,
XWINDOW (minibuf_window)->buffer);
minibuf_window = selected_frame->minibuffer_window;
+
+ /* If the dying minibuffer window was selected,
+ select the new one. */
+ if (minibuffer_selected)
+ Fselect_window (minibuf_window);
}
/* Clear any X selections for this frame. */