On Thu, 7 Nov 2024 at 09:49, martin rudalics <rudalics@gmx.at> wrote:

One problem I see is that in emacsgtkfixed.c we set up the preferred
size of the frame widget and take the width and size from our
min_width/min_height size hints.  From the mutter log we know that these
are broken so maybe GTK does something weird with them.  Please put
breakpoints at the lines

   if (minimum) *minimum = w;

and

   if (minimum) *minimum = h;

within the #else parts of emacs_fixed_get_preferred_width and
emacs_fixed_get_preferred_height in emacsgtkfixed.c and tell me which
values are assigned here: Once for a good scenario and once for a bad
one.  Here I get 0 initially and later on 110 for h and 90 for w.

Just to check I've understood what you want here, I did a first run with the latest gtkutil-frame-2.diff applied, and with breakpoints on those two lines, of simply "emacs -Q", and I get, for just opening the initial window, 4 hits on each breakpoint.

The first hit is w = 0, h = 0.

The other three are w = 64, h = 167.

I wasn't exactly sure what you meant by a "good" or "bad" scenario; but I guess you meant "good" == "with patch applied", and "bad" == "without patch applied"?
 
--
https://rrt.sc3d.org