[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calcula
From: |
martin rudalics |
Subject: |
bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically |
Date: |
Sun, 26 Jun 2022 12:09:25 +0200 |
> If I say that I only want it to scale vertically, I would
> expect no width changes to occur, which means I would expect that
> max-width and anything else width related would not be relevant.
Sounds reasonable.
> My concern was this:
>
>> Also, the sizes of frame and window decorations would hardly match.
>
> Effectively, that there would be some subtle difference between using
> (frame-parameter frame 'width) as MAX-WIDTH and passing nil to
> window-text-pixel-size window.
I was wrong earlier. The doc-string of 'fit-frame-to-buffer' says that
MAX-HEIGHT, MIN-HEIGHT, MAX-WIDTH and MIN-WIDTH specify bounds on
the new total size of FRAME’s root window.
But actually it is the _body_ size of FRAME's root window the current
code constrains. Incidentally, the default body width of a live root
window equals the value of FRAME's width parameter (the native width of
the frame minus the widths of the internal border, the scroll bar and
the fringes) which makes your fix work. With a non-standard setup, say
after doing
(set-window-margins nil 10 10)
in the root window, your fix will fail with the scenario you provided
earlier.
We could try the following: If the new diff I attach now works for you,
I'll push it to master. If after some period of grace (whose length you
determine) I manage to come up with a reasonable fix, I'll push that to
master too and you and your clients will have to adapt. WDYT?
martin
fit-frame-to-buffer.diff
Description: Text Data
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, Aaron Jensen, 2022/06/19
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, Eli Zaretskii, 2022/06/22
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, Aaron Jensen, 2022/06/22
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, martin rudalics, 2022/06/23
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, Aaron Jensen, 2022/06/23
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, martin rudalics, 2022/06/24
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, Aaron Jensen, 2022/06/24
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically,
martin rudalics <=
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, Aaron Jensen, 2022/06/26
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, martin rudalics, 2022/06/27
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, Aaron Jensen, 2022/06/27
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, martin rudalics, 2022/06/28
- bug#56102: 29.0.50; fit-frame-to-buffer's window-text-pixel-size calculation can be incorrect when only is set to vertically, Aaron Jensen, 2022/06/28