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/window.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/window.c')
| -rw-r--r-- | src/window.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c index 753ebc16fbf..acbefcdad16 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2377,8 +2377,10 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow, | |||
| 2377 | == FRAME_TERMINAL (XFRAME (selected_frame))); | 2377 | == FRAME_TERMINAL (XFRAME (selected_frame))); |
| 2378 | } | 2378 | } |
| 2379 | else if (WINDOWP (all_frames)) | 2379 | else if (WINDOWP (all_frames)) |
| 2380 | candidate_p = (EQ (FRAME_MINIBUF_WINDOW (f), all_frames) | 2380 | /* To qualify as candidate, it's not sufficient for WINDOW's frame |
| 2381 | || EQ (XWINDOW (all_frames)->frame, w->frame) | 2381 | to just share the minibuffer window - it must be active as well |
| 2382 | (see Bug#24500). */ | ||
| 2383 | candidate_p = (EQ (XWINDOW (all_frames)->frame, w->frame) | ||
| 2382 | || EQ (XWINDOW (all_frames)->frame, FRAME_FOCUS_FRAME (f))); | 2384 | || EQ (XWINDOW (all_frames)->frame, FRAME_FOCUS_FRAME (f))); |
| 2383 | else if (FRAMEP (all_frames)) | 2385 | else if (FRAMEP (all_frames)) |
| 2384 | candidate_p = EQ (all_frames, w->frame); | 2386 | candidate_p = EQ (all_frames, w->frame); |