aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
authorAlan Mackenzie2022-05-20 20:18:38 +0000
committerAlan Mackenzie2022-05-20 20:18:38 +0000
commitdfa3e6f424b20fe27d9041b2ce7d69811df5d8cd (patch)
tree38c5c3805d73a53f58883ca6cd25e7e3b80d7fdd /src/frame.c
parentde35e9728f3d821e280b5c97c66f1ba8991cd700 (diff)
downloademacs-dfa3e6f424b20fe27d9041b2ce7d69811df5d8cd.tar.gz
emacs-dfa3e6f424b20fe27d9041b2ce7d69811df5d8cd.zip
Restore the Fselect_window call in gui_consider_frame_title.
This fixes bug #55412. The call to Fselect_window was removed on 2021-03-21 in the commit "Prevent open minibuffers getting lost when their frame gets deleted". This call is actually needed to determine current elements of the pertinent window and frame when these are used in the frame title. * src/frame.c (do_switch_frame): When the selected window in the target frame is the mini-window, switch away from this window unless there is a valid minibuffer there. * src/frame.h (struct frame): Add an incidental comment about the element selected_window. * src/minibuf.c (move_minibuffers_onto_frame): No longer set the selected window of the source frame. This action is now performed later, on returning to that frame, in do_switch_frame when needed (see above). * src/xdisp.c (gui_consider_frame_title): Replace the Fselect_window call and associated ancillary settings.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index ccac18d23c2..dc8045f41e6 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1564,6 +1564,13 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
1564 if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame))) 1564 if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame)))
1565 last_nonminibuf_frame = XFRAME (selected_frame); 1565 last_nonminibuf_frame = XFRAME (selected_frame);
1566 1566
1567 /* If the selected window in the target frame is its mini-window, we move
1568 to a different window, the most recently used one, unless there is a
1569 valid active minibuffer in the mini-window. */
1570 if (EQ (f->selected_window, f->minibuffer_window)
1571 && NILP (Fminibufferp (XWINDOW (f->minibuffer_window)->contents, Qt)))
1572 Fset_frame_selected_window (frame, call1 (Qget_mru_window, frame), Qnil);
1573
1567 Fselect_window (f->selected_window, norecord); 1574 Fselect_window (f->selected_window, norecord);
1568 1575
1569 /* We want to make sure that the next event generates a frame-switch 1576 /* We want to make sure that the next event generates a frame-switch