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

From: martin rudalics <[email-masked]>
Date: Sat, 7 Sep 2024 10:37:55 +0200

> I then applied the trivial patch you gave to git master HEAD, ran 'emacs
 > -Q' and did C-x 5 2, and got a small window as usual, but with no error
 > message in the terminal.

Let's try to continue from here.  Instead of the "trivial" patch please
now use

diff --git a/src/xfns.c b/src/xfns.c
index 3f0d8f3fcd0..e47f5219a6f 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5340,7 +5340,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
    gui_default_parameter (f, parms, Qno_accept_focus, Qnil,
                           NULL, NULL, RES_TYPE_BOOLEAN);

-#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
+#if defined (USE_X_TOOLKIT) && !defined (USE_GTK)
    /* Create the menu bar.  */
    if (!minibuffer_only && FRAME_EXTERNAL_MENU_BAR (f))
      {

Do you see any error message in the terminal?  Now set

(setq default-frame-alist '((menu-bar-lines . 0)))

and do C-x 5 2.  How does that behave?

martin