Subject: Re: bug#72986: Disabling menu-bar-mode changes size of new frames

From: martin rudalics <[email-masked]>
Date: Fri, 6 Sep 2024 11:50:16 +0200

> Buffer contents for master HEAD after C-x 5 2:

I can't figure out what's going on.  We get a

ConfigureNotify, PS=400x374, XS=1280x1354

event that tells us to set the frame to some "reasonable" size at least.
And the penultimate lines

 > change_frame_size (5), TS=352x374~>1232x1354, TC=22x10~>77x38,
 > NS=400x374~>1280x1354, IS=400x374~>1280x1354, MS=32x70 IH IV

tell, for example, that the text size of the frame should increase from
22x10 columns/lines to 77x38 (38 being obviously too large).  But
apparently nothing changes which is a complete mystery because

- if the WM does give us the indicated new size and we do not react, you
   should at least see an excessive frame border around or a much too
   long title bar above the contents of the new frame,

- if the WM only pretended to give us the indicated new size, you should
   see the new frame clipped at the right and bottom.

Since neither of these apparently happen, I'm clueless.  Could you do
the following: adjust_frame_size (in frame.c) contains the line

   if (new_inner_width != old_inner_width)

Please put a breakpoint there and look what happens when new_inner_width
is 1280.  That is, use

condition B new_inner_width == 1280

where B is the number of the breakpoint you've set.  I'm mostly
interested in whether the breakpoint gets hit at all.  If it does get
hit, we can try to dig further.

martin