]> git.eshelyaron.com Git - emacs.git/commit
Fix handling of visibility on tty frames (Bug#76031)
authorMartin Rudalics <rudalics@gmx.at>
Mon, 10 Feb 2025 09:36:38 +0000 (10:36 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 10 Feb 2025 20:56:46 +0000 (21:56 +0100)
commit5d88e5572258d8023a75ee03d694ce5a27d13728
treee2ca98f3685cc91a8104f09327e864c248c6aef4
parenta999d264dc1ced6ba2e3e5d2252a389f8e3ab32e
Fix handling of visibility on tty frames (Bug#76031)

* src/frame.h (FRAME_REDISPLAY_P): Remove.  Use the new function
frame_redisplay_p instead.  Extern frame_redisplay_p.
* src/frame.c (frame_redisplay_p): New function to replace
FRAME_REDISPLAY_P macro.
(make_terminal_frame): Don't tinker with frame visibility and
don't make the new frame the terminal's top frame.
(do_switch_frame): Make sure frame switched to and any of its
ancestors are visible.  Don't reset the visibility of other
frames.
(other_frames): Do not assume tty frames are by default visible.
(Fmake_frame_invisible): When making the selected tty frame
invisible, explicitly select the next visible frame.
* src/dispnew.c (Fredraw_display): Use frame_redisplay_p instead
of FRAME_REDISPLAY_P.
* src/xdisp.c (clear_garbaged_frames, echo_area_display)
(prepare_menu_bars, redisplay_internal, display_and_set_cursor)
(gui_clear_cursor): Use frame_redisplay_p instead of
FRAME_REDISPLAY_P.
* src/keyboard.c (tty_read_avail_input): When storing an event
and the selected frame is a child frame whose root is its
terminal's top frame, set the frame_or_window slot to the child
frame since otherwise the next switch frame event will select
the top frame instead.

(cherry picked from commit 4d1ceac9f9332f74ac2ab300eb2a629ea742b1dc)
src/dispnew.c
src/frame.c
src/frame.h
src/keyboard.c
src/xdisp.c
src/xterm.h