aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2025-12-20 15:12:39 +0100
committerMartin Rudalics2025-12-20 15:12:39 +0100
commitcf2e676ecab42a3f2add728eca20bb23d2a73728 (patch)
treee394d8ea91e15453c66c7c0441b17a942386df2f /src
parent69ca26996c20fb0acea98a64b9174e283d1a3375 (diff)
downloademacs-cf2e676ecab42a3f2add728eca20bb23d2a73728.tar.gz
emacs-cf2e676ecab42a3f2add728eca20bb23d2a73728.zip
Don't change visibility of tty root frames (Bug#80032)
* src/frame.c (Fmake_frame_visible, Fmake_frame_invisible): * doc/lispref/frames.texi (Visibility of Frames): Don't change visibility of tty root frames. (Bug#80032)
Diffstat (limited to 'src')
-rw-r--r--src/frame.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/frame.c b/src/frame.c
index 131f1967424..49317379354 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3366,7 +3366,7 @@ If omitted, FRAME defaults to the currently selected frame. */)
3366 if (FRAME_WINDOW_P (f) && FRAME_TERMINAL (f)->frame_visible_invisible_hook) 3366 if (FRAME_WINDOW_P (f) && FRAME_TERMINAL (f)->frame_visible_invisible_hook)
3367 FRAME_TERMINAL (f)->frame_visible_invisible_hook (f, true); 3367 FRAME_TERMINAL (f)->frame_visible_invisible_hook (f, true);
3368 3368
3369 if (is_tty_frame (f)) 3369 if (is_tty_child_frame (f))
3370 { 3370 {
3371 SET_FRAME_VISIBLE (f, true); 3371 SET_FRAME_VISIBLE (f, true);
3372 tty_raise_lower_frame (f, true); 3372 tty_raise_lower_frame (f, true);
@@ -3410,11 +3410,9 @@ Normally you may not make FRAME invisible if all other frames are
3410invisible, but if the second optional argument FORCE is non-nil, you may 3410invisible, but if the second optional argument FORCE is non-nil, you may
3411do so. 3411do so.
3412 3412
3413On a text terminal make FRAME invisible if and only FRAME is either a 3413On a text terminal make FRAME invisible if and only if FRAME is a child
3414child frame or another non-child frame can be found. In the former 3414frame. If, in that case, FRAME is the selected frame, select the first
3415case, if FRAME is the selected frame, select the first visible ancestor 3415visible ancestor of FRAME instead. */)
3416of FRAME instead. In the latter case, if FRAME is the top frame of its
3417terminal, make another frame that terminal's top frame. */)
3418 (Lisp_Object frame, Lisp_Object force) 3416 (Lisp_Object frame, Lisp_Object force)
3419{ 3417{
3420 struct frame *f = decode_live_frame (frame); 3418 struct frame *f = decode_live_frame (frame);
@@ -3427,18 +3425,14 @@ terminal, make another frame that terminal's top frame. */)
3427 if (FRAME_WINDOW_P (f) && FRAME_TERMINAL (f)->frame_visible_invisible_hook) 3425 if (FRAME_WINDOW_P (f) && FRAME_TERMINAL (f)->frame_visible_invisible_hook)
3428 FRAME_TERMINAL (f)->frame_visible_invisible_hook (f, false); 3426 FRAME_TERMINAL (f)->frame_visible_invisible_hook (f, false);
3429 3427
3430 SET_FRAME_VISIBLE (f, false); 3428 if (is_tty_child_frame (f) && EQ (frame, selected_frame))
3431 3429 {
3432 if (is_tty_frame (f) && EQ (frame, selected_frame)) 3430 SET_FRAME_VISIBLE (f, false);
3433 /* On a tty if FRAME is the selected frame, we have to select another 3431 /* If FRAME is a tty child frame and the selected frame, we have
3434 frame instead. If FRAME is a child frame, use the first visible 3432 to select another frame instead. Use the first visible
3435 ancestor as returned by 'mru_rooted_frame'. If FRAME is a root 3433 ancestor as returned by 'mru_rooted_frame'. */
3436 frame, use the frame returned by 'next-frame' which must exist since 3434 Fselect_frame (mru_rooted_frame (f), Qnil);
3437 otherwise other_frames above would have lied. */ 3435 }
3438 Fselect_frame (FRAME_PARENT_FRAME (f)
3439 ? mru_rooted_frame (f)
3440 : next_frame (frame, make_fixnum (0)),
3441 Qnil);
3442 3436
3443 /* Make menu bar update for the Buffers and Frames menus. */ 3437 /* Make menu bar update for the Buffers and Frames menus. */
3444 windows_or_buffers_changed = 16; 3438 windows_or_buffers_changed = 16;