summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2016-10-17 10:52:01 +0200
committerMartin Rudalics <rudalics@gmx.at>2016-10-17 10:52:01 +0200
commit421c0512f76683e0b85ea5e1362291c2da4149ba (patch)
tree94673c576f72fbfd01d1d3faeaf7e24d60ef4946 /src/frame.c
parent027c350e0cde1876f811b845cb10d3faa8f45665 (diff)
downloademacs-421c0512f76683e0b85ea5e1362291c2da4149ba.tar.gz
Fix frame focus redirection with shared minibuffer windows (Bug#24500)
* src/frame.c (do_switch_frame): Redirect frame focus also when the frame switched to has its minibuffer window on the selected frame. * src/window.c (candidate_window_p): To qualify as candidate it's not sufficient for the window's frame to just share the minibuffer window - it must be active as well.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c
index 45559b0be98..a1c2199d044 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1160,7 +1160,12 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
if (FRAMEP (xfocus))
{
focus = FRAME_FOCUS_FRAME (XFRAME (xfocus));
- if (FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ())
+ if ((FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ())
+ /* Redirect frame focus also when FRAME has its minibuffer
+ window on the selected frame (see Bug#24500). */
+ || (NILP (focus)
+ && EQ (FRAME_MINIBUF_WINDOW (XFRAME (frame)),
+ sf->selected_window)))
Fredirect_frame_focus (xfocus, frame);
}
}