From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Question about dubious code for terminal frames
Date: Mon, 02 Sep 2024 20:02:24 +0200 [thread overview]
Message-ID: <m2frqi6ij3.fsf@pro2.fritz.box> (raw)
In-Reply-To: <f7da7bcf-4b6b-4041-b915-034d604d8463@gmx.at> (martin rudalics's message of "Mon, 2 Sep 2024 19:32:11 +0200")
martin rudalics <rudalics@gmx.at> writes:
>> I think I have the above here. It reads
>>
>> /* Assign new sizes. */
>> FRAME_COLS (f) = new_text_cols;
>> FRAME_LINES (f) = new_text_lines;
>
> It might cause something weird in resize_frame_windows, but that's maybe
> only here.
>
>> Anyway. My problem is setting FrameCols/Rows in adjust_frame_size. It's
>> not guaranteed that the terminal's size has indeed changed when that is
>> done.
>
> You mean the
>
> FrameRows (FRAME_TTY (f)) =
> FrameCols (FRAME_TTY (f)) =
>
> assignments?
Exactly.
> These are from the pre-2014 change_frame_size_1 code with the comments
> mostly preserved and governed by similar conditions. Do you think
> something changed here?
Actually, I wondered if this might be something I overlooked when writing
the new redisplay. Last century :-). Alas, there were so many changes in
the meantime. that I give up trying to find out.
> But I agree that for child frames with their own smaller dimensions
> these assignments should be obviously skipped.
Yes, for child frames it's certainly wrong. And I can easily work around
that.
What I wonder is if it's the right thing to do for normal frames, as
well. What happens if I make-frame a second non-child tty frame with
frame parameters that lead to the FrameRow/Col assignments with smaller
values?
If that happens, the terminal appears to have changed size, which it of
course hasn't. And redisplaying the first frame might trigger an
emacs_abort in cmcheckmagic that tries to make sure that we don't write
beyond the terminal borders, which have been set by the new fraem.
And more general, I wonder why setting the physical terminal size in
adjust_frame_size is the right thing to begin with. I believe
determining the terminal size should happen elsewhere and the size is
and input to the algorith resizing frames.
I don't know whqt Eli thinks about this, as you might have noticed :-)
next prev parent reply other threads:[~2024-09-02 18:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 9:04 Question about dubious code for terminal frames Gerd Möllmann
2024-09-02 9:10 ` Andreas Schwab
2024-09-02 9:48 ` Gerd Möllmann
2024-09-02 10:23 ` Andreas Schwab
2024-09-02 10:46 ` Gerd Möllmann
2024-09-02 11:44 ` Eli Zaretskii
2024-09-02 12:59 ` Gerd Möllmann
2024-09-02 13:17 ` Eli Zaretskii
2024-09-02 14:11 ` Gerd Möllmann
2024-09-02 14:35 ` Eli Zaretskii
2024-09-02 14:54 ` Gerd Möllmann
2024-09-02 15:31 ` Eli Zaretskii
2024-09-02 15:46 ` Gerd Möllmann
2024-09-02 15:55 ` Eli Zaretskii
2024-09-02 16:24 ` Gerd Möllmann
2024-09-02 16:35 ` Eli Zaretskii
2024-09-02 16:38 ` Gerd Möllmann
2024-09-02 17:39 ` Eli Zaretskii
2024-09-02 16:20 ` martin rudalics
2024-09-02 16:31 ` Gerd Möllmann
2024-09-02 17:32 ` martin rudalics
2024-09-02 18:02 ` Gerd Möllmann [this message]
2024-09-02 18:26 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2frqi6ij3.fsf@pro2.fritz.box \
--to=gerd.moellmann@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).