From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>, Ship Mints <shipmints@gmail.com>
Cc: 74750@debbugs.gnu.org
Subject: bug#74750: clone-frame and make-frame pixelwise issues
Date: Tue, 10 Dec 2024 16:56:22 +0100 [thread overview]
Message-ID: <f320347e-d3ce-46e4-b358-5a94336f04fa@gmx.at> (raw)
In-Reply-To: <861pyfd8pe.fsf@gnu.org>
>> clone-frame does not correctly clone frames on a pixelwise basis.
>>
>> make-frame's text-pixels geometry support does not produce specified
>> pixelwise geometry. This also impacts frameset-restore's ability to
>> precisely reproduce pixelwise frame sizes.
This would be a bug in frameset.el. One problem I see is that
'frame-resize-pixelwise' must be set "very early" when restoring a
session - at least _before_ the first time we send size hints to the
window manager.
>> I consider these to be related as clone-frame's use of make-frame could be
>> using text-pixels but if that doesn't work then pixelwise cloning won't
>> work. I did read through the code base as best as I could but could not
>> find the source of the text-pixels issue.
>>
>> The following reproducer, under -Q, shows the same results on 29.4 and
>> 30.0.92. My main platform is NS and I also did some testing on GTK. GTK's
>> issues seem a bit "messier" and I didn't spend any time trying to
>> understand them in depth as I was more interested to know if GTK worked
>> correctly or not, which it doesn't.
Your code binds 'frame-resize-pixelwise' temporarily. This cannot work
reliably. That variable should never change in an Emacs session because
its value affects the way we send size hint increments to the window
manager.
This is, admittedly, a design error that would have to be fixed as
follows:
- Implement a new frame parameter 'resize-pixelwise'.
- Send size hints according to the value of this parameter. When the
parameter is set, new size hints must be sent.
Alternatively, we could send new size hints for all live frames whenever
'frame-resize-pixelwise' is changed. This would have to be done with a
variable watcher. Still, let-binding this variable would confuse the
hell out of our interactions with the window manager. When the scope of
the let-binding is left, we would have to send size hints again.
>> This is an implementation of clone-frame that uses text-pixels under
>> make-frame. This depends on make-frame text-pixels being corrected. Happy
>> to supply this as a patch should the discussion of these issues progress in
>> that direction.
>>
>> (defun clone-frame (&optional frame no-windows pixelwise)
What would the WM do in a situation where PIXELWISE is non-nil and
'frame-resize-pixelwise' is nil?
martin
next prev parent reply other threads:[~2024-12-10 15:56 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 15:51 bug#74750: clone-frame and make-frame pixelwise issues Ship Mints
2024-12-10 12:27 ` Eli Zaretskii
2024-12-10 15:56 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-12-10 16:24 ` Ship Mints
2024-12-11 9:37 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-11 22:41 ` Ship Mints
2024-12-12 6:05 ` Eli Zaretskii
2024-12-12 9:22 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-13 10:30 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-13 16:28 ` Ship Mints
2024-12-13 18:15 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-13 18:25 ` Ship Mints
2024-12-14 8:27 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-15 20:34 ` Ship Mints
2024-12-16 9:23 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 9:32 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 10:40 ` Ship Mints
2024-12-16 10:48 ` Ship Mints
2024-12-16 15:49 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 15:55 ` Ship Mints
2024-12-16 16:01 ` Ship Mints
2024-12-16 16:02 ` Ship Mints
2024-12-16 16:39 ` Ship Mints
2024-12-16 17:06 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 17:32 ` Eli Zaretskii
2024-12-16 17:51 ` Ship Mints
2024-12-16 19:10 ` Eli Zaretskii
2024-12-17 1:20 ` Ship Mints
2024-12-17 9:02 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-17 13:34 ` Eli Zaretskii
2024-12-16 19:13 ` Eli Zaretskii
2024-12-16 19:26 ` Ship Mints
2024-12-17 9:00 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-17 13:29 ` Eli Zaretskii
2024-12-18 10:05 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 16:07 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 16:41 ` Ship Mints
2024-12-16 17:06 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 16:07 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20 15:39 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-22 12:04 ` Ship Mints
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f320347e-d3ce-46e4-b358-5a94336f04fa@gmx.at \
--to=bug-gnu-emacs@gnu.org \
--cc=74750@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=rudalics@gmx.at \
--cc=shipmints@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.