GNU bug report logs - #78980
31.0.50; C-z crashes emacsclient -nw

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Wed, 9 Jul 2025 13:33:02 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 78980 <at> debbugs.gnu.org, Pip Cet <pipcet <at> protonmail.com>, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#78980: 31.0.50; C-z crashes emacsclient -nw
Date: Wed, 09 Jul 2025 18:57:45 +0200
martin rudalics <rudalics <at> gmx.at> writes:

>> I find more interesting what redisplay_internal does. The first thing
>> I see is
>>
>> xdisp.c:
>> 17387       /* If this is a window on a tty root frame displaying a child frame,
>> 17388          the current matrix of W may contain glyphs of that child frame.
>> 17389          Don't try shortcuts that might use the current matrix in this case.  */
>> 17390       && !is_tty_root_frame_with_visible_child (XFRAME (w->frame)))
>>
>> Here w->frame can be invisible, apparently. And I wonder if one should
>> check if the root frame of w->frame is visible as a starter. Something
>> like `FRAME_VISIBLE_P (root_frame (XFRAME (w->frame)))` before checking
>> `is_tty_root...`. Because I wonder if that wouldn't be more correct also
>> in the GUI case.
>>
>> And there are potentially more places. I don't see at the moment if
>> that's already done somewhere in redisplay_internal, but maybe we should
>> discard redisplays for invisible frames somewhere further down, too. Or
>> one could first add assert that frames are visible when we display them,
>> e.g. in redisplay_window and so on?
>
> There is one loose end for GUIs: When I have a child frame marked as
> visible, its parent frame is marked as invisible and their root frame is
> marked as visible, then I have no idea whether there exists a window
> manager that expects us to redraw the child frame marked as visible.  At
> least when that child frame corresponds to a modal window.
>
> martin

Maybe one could pack all that in a new function, say
is_display_optimizable that one would use instead of
is_tty_root_frame_with_visible_children? For tty frames It could check
that the frame is not an invisible root, and then check for visible
chldren.




This bug report was last modified 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.