emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about dubious code for terminal frames


From: Gerd Möllmann
Subject: Re: Question about dubious code for terminal frames
Date: Mon, 02 Sep 2024 17:46:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Gerd Möllmann <gerd.moellmann@gmail.com>
>> Cc: emacs-devel@gnu.org,  rudalics@gmx.at
>> Date: Mon, 02 Sep 2024 16:54:31 +0200
>> 
>> > But with the current proliferation of terminal emulators whose window
>> > can be resized, what other choice do we have when the only source of
>> > information about the resize is SIGWINCH?  How else can we update the
>> > Emacs notion of the frame's size?
>> 
>> See get_tty_size which the SIGWINCH handler already calls. We could use
>> that to get the physical dimension of the terminal.
>
> Get the physical dimensions and then what?  We must record the
> dimensions in the frames and windows that share that terminal.  Which
> is what change_frame_size does.

Set the terminal size And then do what we currently do to adapt the
frame sizes. Only that the terminal size%1b[<35;19;43M now an input and
not the result of frame size changes.

>
>> Outside of get_tty_size I'd make FrameCols/Rows const. I guess that
>> frame size changes could remain as is. Only that setting FrameCols/Rows
>> is none of their business. It's an input for them, not an output.
>
> Martin will correct me if I'm wrong, but I think the current code
> already does what you want: it only changes FrameCols/Rows when the
> terminal was really resized.

It obviously does not. I mentioned what happens when making child frames
in adjust_frame_size in my case. There is no SIGWINCH involved. Which
makes me suspect that you are not taking adjust_frame_size into
account?







reply via email to

[Prev in Thread] Current Thread [Next in Thread]