diff options
| author | Martin Rudalics | 2016-10-17 10:52:01 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2016-10-17 10:52:01 +0200 |
| commit | 421c0512f76683e0b85ea5e1362291c2da4149ba (patch) | |
| tree | 94673c576f72fbfd01d1d3faeaf7e24d60ef4946 /src/frame.c | |
| parent | 027c350e0cde1876f811b845cb10d3faa8f45665 (diff) | |
| download | emacs-421c0512f76683e0b85ea5e1362291c2da4149ba.tar.gz emacs-421c0512f76683e0b85ea5e1362291c2da4149ba.zip | |
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.c | 7 |
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 | |||
| 1160 | if (FRAMEP (xfocus)) | 1160 | if (FRAMEP (xfocus)) |
| 1161 | { | 1161 | { |
| 1162 | focus = FRAME_FOCUS_FRAME (XFRAME (xfocus)); | 1162 | focus = FRAME_FOCUS_FRAME (XFRAME (xfocus)); |
| 1163 | if (FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ()) | 1163 | if ((FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ()) |
| 1164 | /* Redirect frame focus also when FRAME has its minibuffer | ||
| 1165 | window on the selected frame (see Bug#24500). */ | ||
| 1166 | || (NILP (focus) | ||
| 1167 | && EQ (FRAME_MINIBUF_WINDOW (XFRAME (frame)), | ||
| 1168 | sf->selected_window))) | ||
| 1164 | Fredirect_frame_focus (xfocus, frame); | 1169 | Fredirect_frame_focus (xfocus, frame); |
| 1165 | } | 1170 | } |
| 1166 | } | 1171 | } |