Subject: bug#78418: 31.0.50; Change in fit-frame-to-buffer doesn't work with transient-posframe

From: martin rudalics <[email-masked]>
Date: Thu, 15 May 2025 10:13:50 +0200

> I think so.  216 is the smallest multiple of 18 at least as large as
 > 199.  That's what you will get anyway and should have happened also
 > before my commit.  In a sense your were even lucky because if remainder
 > were non-zero, it might have added another 17.  I probably should
 > collapse these so at most 17 are added.

I forgot: I can't collapse them because of the way we set WM size hints.
That's broken for practically all platforms and fixing it will hardly
happen ever.  Which means that with 'frame-resize-pixelwise' we

- first have to round the calculated text size to the next multiple of
   character sizes

- and then have to round the size of the decorations to the next
   multiple of character sizes.

We pass the rounded text size as base size, the character size as
increment and the sum of rounded text and rounded decorations size as
preferred size of the frame.  So with a default character height of 18
pixels you will get 34 extra pixels in the worst case and I see no
practical way to fix that.

martin