From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Reuben Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72986: Disabling menu-bar-mode changes size of new frames Date: Mon, 9 Sep 2024 10:49:37 +0100 Message-ID: References: <7be33291-1828-41a6-bd56-759db2f533ee@gmx.at> <44e0648e-b374-4816-8f3b-6948af471ab1@gmx.at> <4c2fe23a-be76-4cdc-8f97-16197e1834b0@gmx.at> <300cb820-d6b7-44c6-8609-fa7804babf99@gmx.at> Reply-To: Reuben Thomas Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006e6d1e0621acad8d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15365"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , Eli Zaretskii , 72986@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 09 11:51:28 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1snb3P-0003hi-Dw for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Sep 2024 11:51:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snb34-00064R-Of; Mon, 09 Sep 2024 05:51:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1snb2z-00064C-Cp for bug-gnu-emacs@gnu.org; Mon, 09 Sep 2024 05:51:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1snb2x-0006rK-Mm for bug-gnu-emacs@gnu.org; Mon, 09 Sep 2024 05:51:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=nwbOJcBBq1I14MkG2jQBtgU0C4XEYSD/aLu2qp87PwI=; b=kSg7YwgTqBXSTWkXmuTqgoteHfutQVi3UV6HFzjWuW/tYjNavipL1WNnXZ81z6Z7ktH1OTZ+kxElqbRojFXMJ751wxyw8qR1NveR+ykfX0bAxMBMletsuW6Q8YP1pBjKdwnJtQBOHEF+IrkxpmshcCqqBAWLHGMf6kfIf8QufAAGtueCydETtnX9QvLUCBUTjJiQogPhSNpW9sCNuqQN/QkmmKd0Y1BeEwlkY3+dRLRdNWGZGvh1/OVtXz2r7XzT0A91S4Kkav+CN/QlcYJYzIvsxLuZRA3opNqMzpHpqjSkiORSC5u8P4lgNSeP8cL6moNPMgFGt/ik8GSedOp8kQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1snb30-0002Vr-Km for bug-gnu-emacs@gnu.org; Mon, 09 Sep 2024 05:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Sep 2024 09:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72986 X-GNU-PR-Package: emacs Original-Received: via spool by 72986-submit@debbugs.gnu.org id=B72986.17258754609649 (code B ref 72986); Mon, 09 Sep 2024 09:51:02 +0000 Original-Received: (at 72986) by debbugs.gnu.org; 9 Sep 2024 09:51:00 +0000 Original-Received: from localhost ([127.0.0.1]:60654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snb2x-0002VX-FP for submit@debbugs.gnu.org; Mon, 09 Sep 2024 05:51:00 -0400 Original-Received: from mail-yw1-f170.google.com ([209.85.128.170]:57670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snb2v-0002VJ-E5 for 72986@debbugs.gnu.org; Mon, 09 Sep 2024 05:50:58 -0400 Original-Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-6c130ffa0adso36487347b3.3 for <72986@debbugs.gnu.org>; Mon, 09 Sep 2024 02:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; t=1725875388; x=1726480188; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nwbOJcBBq1I14MkG2jQBtgU0C4XEYSD/aLu2qp87PwI=; b=PvCvjUeyoRxzYqzm+MCxqSMc2Mc2HEEBlsE9DcZYbGWi6xolbZbaMPBeEkYl6Q4cYs GgSnC3b8AsS9Ar+O3pTx0s2ZwD1xygfg++24d+1sSIuRPhp+IuGbv6Wu5TQha5tAOZ4N IRnRSpbmEYBQynMigffG+BJjwuq9FgBjDyeiE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725875388; x=1726480188; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nwbOJcBBq1I14MkG2jQBtgU0C4XEYSD/aLu2qp87PwI=; b=IBQlQFb8uAqoe+VWfYsXmbTf+QN8HgzYcGNTJhRfVV0d4g6hzOtADI6xZXPyy8XQHp BJeMOCTe0AJt9yxhdDpsB4GxaSNudruFiyd1yB17q1BmPrXVmyEr0kXQtwDZNUk3ZYBE NNe4zu+69/yi2CW3un22yTgLyR1xjCwR7keZSs1wO2jzb7RPCqRcQvxEiHZUQSjjterZ FkBKKzW7TTjCz/sAYGE8NWqCBfV1+9E3dEQ7x6wWukGcTSYxalw/vsKYKVP0ZkoPgG5B /igLs+1fdkmVyuHIrW83u9D2bXkBEeLXqKL2RAzj1RiM0Jc/sNTkTAHdDg9n15aZFi+q IZBg== X-Forwarded-Encrypted: i=1; AJvYcCUTe0x2jghHV9dCnbg8MuRZMf2yxLh7N5hlxsmactDwVrXX1Qx5Y3fnFv3kuMP8a5fvQhOkhw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyAc9bNdSgKtmuzAux1IS06wNFOEf8eDKbkWe3dDOK7yRbh+qE4 YqTnG2qkDC3Uf2ms/W/HfMgZFRCxCQnsTvrmFMqolqbIAV56R1JJZVVbeeFC1QmtFtWvHO3bdDN L16LAPzxFZfNgWLbAJ5gXiiEH5wifbm1HcDm5AQ== X-Google-Smtp-Source: AGHT+IFbg58P1sb83wjboM+0elaWMWpgtJrg+SECZI0C8v0eIpheuuxiE+EllGJAzxmco4vi55m8ZHWMqCf3IQhCiVE= X-Received: by 2002:a05:690c:dc7:b0:62f:f535:f38 with SMTP id 00721157ae682-6db44d69ef7mr126498197b3.8.1725875388042; Mon, 09 Sep 2024 02:49:48 -0700 (PDT) In-Reply-To: <300cb820-d6b7-44c6-8609-fa7804babf99@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291493 Archived-At: --0000000000006e6d1e0621acad8d Content-Type: text/plain; charset="UTF-8" Thanks for your persistence, Martin! On Mon, 9 Sept 2024 at 09:58, martin rudalics wrote: > > I forgot whether creating an initial frame without menubar works > reasonably on your system. So please do the same once more but this > time with --eval "(setq default-frame-alist '((menu-bar-lines . 0)))" > appended to your emacs call. This will conclude our experiments with > the history of the initial frame. > So, I'm doing this with git master HEAD still with the patch that changes frame.c to initialize frame_size_history thus: frame_size_history = Fcons (make_fixnum (100), Qnil); And here is the contents of *frame-size-history*: Frame size history of # x_create_frame_1 (5), TS=80x25~>1280x875, NS=80x25~>1296x875, IS=80x25~>1296x875, MS=32x70 IH IV gui_figure_window_size (5), TS=1280x875~>1280x1260, TC=80x25~>80x36, NS=1296x875~>1296x1260, IS=1296x875~>1296x1260, MS=32x70 IH IV scroll-bar-width (3), NS=1296x1260~>1328x1260, IS=1296x1260~>1328x1260, MS=160x175 scroll-bar-height (3), MS=160x175 menu-bar-lines (2), MS=160x175 x_create_frame_2 (0), MS=160x175 xg_frame_set_char_size, invisible, PS=1328x1260, XS=1328x1260, DS=1328x1260 xg_frame_set_char_size (5), MS=32x70 IH IV x_make_frame_visible MapNotify, not hidden & not iconified, PS=1328x1260, DS=1328x1260 ConfigureNotify, PS=1328x1260, XS=1328x1260, DS=1328x1260 xg_frame_resized, unchanged, PS=1328x1260, XS=1328x1260 ConfigureNotify, PS=1328x1260, XS=1328x1258, DS=1328x1260 xg_frame_resized, changed, PS=1328x1260, XS=1328x1258 change_frame_size_1, delayed, PS=1328x1260, XS=1328x1258, DS=1328x1260 change_frame_size (5), TS=1280x1260~>1280x1258, TC=80x36~>80x35, NS=1328x1260~>1328x1258, IS=1328x1260~>1328x1258, MS=32x70 IH IV menu-bar-lines (2), MS=160x175 xg_frame_set_char_size, visible, PS=1328x1258, XS=1328x1258 ConfigureNotify, PS=1328x1258, XS=1328x1258 xg_frame_resized, unchanged, PS=1328x1258, XS=1328x1258 tool-bar-lines (2), MS=160x175 xg_frame_set_char_size, visible, PS=1328x1258, XS=1328x1258 ConfigureNotify, PS=1328x1258, XS=1328x1258 xg_frame_resized, unchanged, PS=1328x1258, XS=1328x1258 set_window_configuration (4), MS=160x175 IH IV (I observe that this seems to behave just like the "vanilla" version of the test, only there's no menu bar in the initial frame.) > Next let's try the following: Upon receiving a ConfigureNotify event we > don't call change_frame_size when _we_ conclude that nothing has > changed. This conclusion might be wrong so let's _always_ process a > ConfigureNotify event via change_frame_size with the trivial patch I > attached as gtkutil-change.diff. > OK, so with just gtkutil-change.diff applied to git master HEAD, I get the same behaviour as ever when starting 'emacs -Q' and then typing C-x 5 2. If this doesn't accomplish anything (as I'd expect), let's try to be > stubborn. For this purpose apply the less trivial patch attached as > gtkutil-reject.diff, do > > (setq frame-size-history '(100)) > > C-x 5 2 > > (frame--size-history) > > and tell me what *frame-size-history* says in the new frame Frame size history of # x_create_frame_1 (5), TS=80x25~>1280x875, NS=80x25~>1296x875, IS=80x25~>1296x875, MS=32x70 IH IV gui_figure_window_size (5), TS=1280x875~>1280x1260, TC=80x25~>80x36, NS=1296x875~>1296x1260, IS=1296x875~>1296x1260, MS=32x70 IH IV scroll-bar-width (3), NS=1296x1260~>1328x1260, IS=1296x1260~>1328x1260, MS=160x175 scroll-bar-height (3), MS=160x175 menu-bar-lines (2), MS=160x175 x_create_frame_2 (0), MS=160x175 xg_frame_set_char_size, invisible, PS=1328x1260, XS=1328x1260, DS=1328x1260 xg_frame_set_char_size (5), MS=32x70 IH IV x_make_frame_visible MapNotify, not hidden & not iconified, PS=1328x1260, DS=1328x1260 ConfigureNotify, PS=1328x1260, XS=400x340, DS=1328x1260 xg_frame_resized, changed, PS=1328x1260, XS=400x340 change_frame_size_1, delayed, PS=1328x1260, XS=400x340, DS=1328x1260 tool-bar-lines (2), NS=1328x1260~>400x340, MS=160x175 xg_frame_set_char_size, visible, PS=1328x1260, XS=400x340, DS=400x340 ConfigureNotify, PS=1328x1260, XS=400x374, DS=400x340 xg_frame_resized, changed, PS=1328x1260, XS=400x374, DS=400x340 change_frame_size_1, delayed, PS=1328x1260, XS=400x374, DS=400x340 change_frame_size (5), TS=1280x1260~>352x374, TC=80x36~>22x10, NS=1328x1260~>400x374, IS=1328x1260~>400x374, MS=32x70 IH IV set_window_configuration (4), MS=160x175 IH IV set_window_configuration (4), MS=160x175 IH IV (No infinite loop!) -- https://rrt.sc3d.org --0000000000006e6d1e0621acad8d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for your persistence, Martin!

On Mon, 9 Sept 2024 at 09:58, mart= in rudalics <rudalics@gmx.at> = wrote:

I forgot whether creating an initial frame without menubar works
reasonably on your system.=C2=A0 So please do the same once more but this time with --eval "(setq default-frame-alist= '((menu-bar-lines . 0)))"
appended to your emacs call.=C2=A0 This will conclude our experiments with<= br> the history of the initial frame.

So, I'm doing this with git master HEAD still with the pa= tch that changes frame.c to initialize frame_size_history thus:

=C2=A0 frame_size_history =3D Fco= ns (make_fixnum (100), Qnil);

And here is the contents of *frame-size-history*:

Frame size history of #<frame =C2= =A0*Minibuf-1* - GNU Emacs at ecls 0x56eeaaf4faa0>
x_create_frame_1 (= 5), TS=3D80x25~>1280x875, NS=3D80x25~>1296x875, IS=3D80x25~>1296x8= 75, MS=3D32x70 IH IV
gui_figure_window_size (5), TS=3D1280x875~>1280x= 1260, TC=3D80x25~>80x36, NS=3D1296x875~>1296x1260, IS=3D1296x875~>= 1296x1260, MS=3D32x70 IH IV
scroll-bar-width (3), NS=3D1296x1260~>132= 8x1260, IS=3D1296x1260~>1328x1260, MS=3D160x175
scroll-bar-height (3)= , MS=3D160x175
menu-bar-lines (2), MS=3D160x175
x_create_frame_2 (0),= MS=3D160x175
xg_frame_set_char_size, invisible, PS=3D1328x1260, XS=3D13= 28x1260, DS=3D1328x1260
xg_frame_set_char_size (5), MS=3D32x70 IH IV
= x_make_frame_visible
MapNotify, not hidden & not iconified, PS=3D132= 8x1260, DS=3D1328x1260
ConfigureNotify, PS=3D1328x1260, XS=3D1328x1260, = DS=3D1328x1260
xg_frame_resized, unchanged, PS=3D1328x1260, XS=3D1328x12= 60
ConfigureNotify, PS=3D1328x1260, XS=3D1328x1258, DS=3D1328x1260
xg= _frame_resized, changed, PS=3D1328x1260, XS=3D1328x1258
change_frame_siz= e_1, delayed, PS=3D1328x1260, XS=3D1328x1258, DS=3D1328x1260
change_fram= e_size (5), TS=3D1280x1260~>1280x1258, TC=3D80x36~>80x35, NS=3D1328x1= 260~>1328x1258, IS=3D1328x1260~>1328x1258, MS=3D32x70 IH IV
menu-b= ar-lines (2), MS=3D160x175
xg_frame_set_char_size, visible, PS=3D1328x12= 58, XS=3D1328x1258
ConfigureNotify, PS=3D1328x1258, XS=3D1328x1258
xg= _frame_resized, unchanged, PS=3D1328x1258, XS=3D1328x1258
tool-bar-lines= (2), MS=3D160x175
xg_frame_set_char_size, visible, PS=3D1328x1258, XS= =3D1328x1258
ConfigureNotify, PS=3D1328x1258, XS=3D1328x1258
xg_frame= _resized, unchanged, PS=3D1328x1258, XS=3D1328x1258
set_window_configura= tion (4), MS=3D160x175 IH IV

(I observe that this seems to behave just like the "vanilla&q= uot; version of the test, only there's no menu bar in the initial frame= .)
=C2=A0
Next let's try the following: Upon receiving a ConfigureNotify event we=
don't call change_frame_size when _we_ conclude that nothing has
changed.=C2=A0 This conclusion might be wrong so let's _always_ process= a
ConfigureNotify event via change_frame_size with the trivial patch I
attached as gtkutil-change.diff.

OK, so with just gtkutil-change.diff applied to git master HEA= D, I get the same behaviour as ever when starting 'emacs -Q' and th= en typing C-x 5 2.

If this doesn't accomplish anything (as I'd expect), let's try = to be
stubborn.=C2=A0 For this purpose apply the less trivial patch attached as gtkutil-reject.diff, do

(setq frame-size-history '(100))

C-x 5 2

(frame--size-history)

and tell me what *frame-size-history* says in the new frame

Frame size history of #<frame =C2=A0*Minibuf-1* 0x63246= 43cf650>
x_create_frame_1 (5), TS=3D80x25~>1280x875, NS=3D80x25~&g= t;1296x875, IS=3D80x25~>1296x875, MS=3D32x70 IH IV
gui_figure_window_= size (5), TS=3D1280x875~>1280x1260, TC=3D80x25~>80x36, NS=3D1296x875~= >1296x1260, IS=3D1296x875~>1296x1260, MS=3D32x70 IH IV
scroll-bar-= width (3), NS=3D1296x1260~>1328x1260, IS=3D1296x1260~>1328x1260, MS= =3D160x175
scroll-bar-height (3), MS=3D160x175
menu-bar-lines (2), MS= =3D160x175
x_create_frame_2 (0), MS=3D160x175
xg_frame_set_char_size,= invisible, PS=3D1328x1260, XS=3D1328x1260, DS=3D1328x1260
xg_frame_set_= char_size (5), MS=3D32x70 IH IV
x_make_frame_visible
MapNotify, not h= idden & not iconified, PS=3D1328x1260, DS=3D1328x1260
ConfigureNotif= y, PS=3D1328x1260, XS=3D400x340, DS=3D1328x1260
xg_frame_resized, change= d, PS=3D1328x1260, XS=3D400x340
change_frame_size_1, delayed, PS=3D1328x= 1260, XS=3D400x340, DS=3D1328x1260
tool-bar-lines (2), NS=3D1328x1260~&g= t;400x340, MS=3D160x175
xg_frame_set_char_size, visible, PS=3D1328x1260,= XS=3D400x340, DS=3D400x340
ConfigureNotify, PS=3D1328x1260, XS=3D400x37= 4, DS=3D400x340
xg_frame_resized, changed, PS=3D1328x1260, XS=3D400x374,= DS=3D400x340
change_frame_size_1, delayed, PS=3D1328x1260, XS=3D400x374= , DS=3D400x340
change_frame_size (5), TS=3D1280x1260~>352x374, TC=3D8= 0x36~>22x10, NS=3D1328x1260~>400x374, IS=3D1328x1260~>400x374, MS= =3D32x70 IH IV
set_window_configuration (4), MS=3D160x175 IH IV
set_w= indow_configuration (4), MS=3D160x175 IH IV

(No infinite loop!)

--
--0000000000006e6d1e0621acad8d--