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

From: Gerd Möllmann <[email-masked]>
Date: Mon, 19 May 2025 10:23:05 +0200

martin rudalics <[email-masked]> writes:

>> Thanks, that fixes the tty case, but on the GUI it still looks like in
>> the screen shot I sent.
>
> I checked in this fix so the tty case should be OK now.  

Thanks!

> As for the GUI case I'm not sure what to do. Currently, our size hints
> are Potemkin villages and I doubt this will ever change. What would
> have to be done at the very least is:
>
> - Specify resize increments for frames separately so frames meant to be
>   fit to their buffers (like those of posframe) could be always fit
>   exactly without compromising the behavior for normal frames.  This is
>   a non-invasive change but it will take some time until the designers
>   of child frame based solutions will pick it up.
>
> - Fix the base and minimum size calculations.  This is an invasive
>   change since base and minimum sizes may change all the times and we
>   have to inform the WM about each such change.
>
> - Fix gravity.  Currently, all nonX platforms have to separately define
>   ten gravity values which are completely useless.  All we pass to a WM
>   is NorthWestGravity although other values would make sense for child
>   frames.  Changing this is easy but we would have to provide emulations
>   for WMs that do not heed size hints which is tedious.
>
> - Fix the XNegative/Negative values.  This way we could leave it to the
>   WM to exactly align frames to the right and bottom edges of a display
>   or parent frame whenever frame sizes change (recall the examples we
>   early tested for how to correctly align initial frames against these
>   edges).  Again we would have to emulate that for WMs that ignore size
>   hints.
>
> Personally I have no hope that any of these will ever see the light of
> the day.

Maybe we should set the default of frame-resize-pixelwise to true? Or at
least on macOS? IIRC you recommended setting it to true unless the WM
does mess with the frame size. On macOS this seems to be the right
default.