On Fri, 4 Oct 2024 at 16:01, martin rudalics <rudalics@gmx.at> wrote:

... and here we get the correct number of lines albeit with a surplus of
12 pixels.  How does that first frame without menu bar look to you?

Looks correct. Unlike some previous situations, where there were oddities (e.g. the frame was wider than the Emacs window, or the minibuf was cut off at the bottom), the frame seems to fit the contents perfectly.
 
This time I'll have to look into our code first - something is fishy.

If there are any volunteers on GNOME who can apply a patch and check
whether they get the same either buggy or correct behavior, preferably
with a scaled screen, I'd be very, very grateful.

Good to see you're making progress! I can check on two different machines, for what it's worth, although with the same version of GNOME and same scale (but with different screen sizes).

--
https://rrt.sc3d.org