From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics 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: Fri, 4 Oct 2024 17:01:25 +0200 Message-ID: <3d0a1e9a-5efc-4491-ab85-e3e58cb0f068@gmx.at> References: <7c94c78e-5ffd-4a41-948a-8e1a2ccefb91@gmx.at> <4af02761-273f-41dd-b257-37c37ded0fb4@gmx.at> <9bbb10e9-208f-4d03-87f1-6e63ee293ed5@gmx.at> <4666bf6d-6259-4f72-a65d-56e2c47f98c0@gmx.at> <54072426-c373-420c-8343-29035fba25a6@gmx.at> Reply-To: martin rudalics Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27231"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Po Lu , Eli Zaretskii , 72986@debbugs.gnu.org To: Reuben Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 04 17:02:22 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 1swjoz-0006ti-R2 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Oct 2024 17:02:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swjoh-0006z5-O0; Fri, 04 Oct 2024 11:02:04 -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 1swjod-0006yw-Ut for bug-gnu-emacs@gnu.org; Fri, 04 Oct 2024 11:02:00 -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 1swjod-0000WR-Ld for bug-gnu-emacs@gnu.org; Fri, 04 Oct 2024 11:01:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=4vCa7Zuv70Zm5fMc5M1LMczbWFHWSpgggWPugJKrqpU=; b=sQjkNFI6E5RkNryDCxIZd6eP4lkUCwpjrZm+wZ42UqC3HJ4c0SkTjGH1WztHmbvpQYxmD5LYeJbon52c0xdiBzI3p+J9rCJrtf705E4m8fNXy+qFsLoDsYAsUbzcL9Yq9GW4+Z6kmmvkrGgPp8KaoYXs63TPbrU7oIQybk0c+U1Cpwk/gii19/FxAL+TFkaOw5FG0DF4L+DNz3k2u10ROsnW3/rY9oLi7D55F39mzYZPTL1fVWpe32wFzHU3Tw1HIVOUCL0du+WyCEnULizFH0ZRtvyoVD9nl6xtza/gAZbAE/vz8ovp/edgvD/F946bv0cV9a1vXFqF2MurNEhgbw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swjog-0002j3-Fi for bug-gnu-emacs@gnu.org; Fri, 04 Oct 2024 11:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Oct 2024 15:02: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.172805410510452 (code B ref 72986); Fri, 04 Oct 2024 15:02:02 +0000 Original-Received: (at 72986) by debbugs.gnu.org; 4 Oct 2024 15:01:45 +0000 Original-Received: from localhost ([127.0.0.1]:36208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swjoO-0002iV-9m for submit@debbugs.gnu.org; Fri, 04 Oct 2024 11:01:44 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:45757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swjoL-0002iH-Hc for 72986@debbugs.gnu.org; Fri, 04 Oct 2024 11:01:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1728054086; x=1728658886; i=rudalics@gmx.at; bh=4vCa7Zuv70Zm5fMc5M1LMczbWFHWSpgggWPugJKrqpU=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=d7mLocGXFx52Pw7jYkyU26mLm5ejofGr6+lTPrHiysM5+7i3ZxpNm5Mw6s6eqmTY fg+s6Ok4b5nwF9kd5E7netz5upQgomllXNAX9OdaKQ+mM+TXHiHsM5LwrGsDnzNPg 4WpDYi7ZbYD8cML6MQN6zrbyNxUrQoYT1WKjkAIgiJinNA9C4RvW8Dn68Gw01cF28 mYCJVngYV2oLrI7vcVGfkSeRhl3ieR7lP1Hnu8VRC6KbEtxT3N3hxIzgGIhimDdB2 fR00F7/5umFUfJh7tcDCS/t4dRlyf2Vm01AJHobzQbD62YGazZqDxCtLcjlcD3rb0 cE9nHxSumqNj20UXKA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([46.125.249.89]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MRCK6-1tJvUo211Y-00P5Xx; Fri,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Ok pA/YSz7NYQwfnrAug0AthztNzU1jbDBGzmON0d6OYvAE4To1mVx9daVWKYzsmga/dtPmamVH 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:292971 Archived-At: > First frame with menu bar: > > Frame size history of # 0x59e577a85750> > 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 This is our first explicit call to set the frame size albeit for an invisible frame. > 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 So far I failed to notice that first ConfigureNotify following the MapNotify. It comes with the expected values XS=1328x1260. Where on earth does it come from ... > xg_frame_resized, unchanged, PS=1328x1260, XS=1328x1260 > ConfigureNotify, PS=1328x1260, XS=1328x1258, DS=1328x1260 ... and where does this with XS=1328x1258 come from? On my system, I get just one ConfigureNotify for each xg_frame_set_char_size. > xg_frame_resized, changed, PS=1328x1260, XS=1328x1258 > change_frame_size_1, delayed, PS=1328x1260, XS=1328x1258, DS=1328x1260 Here we steadfastly reject the 1258 pixels conceded to us ... > tool-bar-lines (2), MS=160x175 > xg_frame_set_char_size, visible, PS=1328x1260, XS=1328x1260, DS=1328x1258 > +values, PS=664x654, XS=664x696 ... ask again with 696 (/ (+ 1260 50 82) 2) ... > ConfigureNotify, PS=1328x1260, XS=1328x1258, DS=1328x1258 > xg_frame_resized, changed, PS=1328x1260, XS=1328x1258, DS=1328x1258 > change_frame_size_1, delayed, PS=1328x1260, XS=1328x1258, DS=1328x1258 ... and finally succumb because ConfigureNotify offers us those lousy 1258 pixels once more and we don't delay the change any more. > change_frame_size (5), TS=1280x1260~>1280x1258, TC=80x36~>80x35, > NS=1328x1260~>1328x1258, IS=1328x1260~>1328x1258, MS=32x70 IH IV > set_window_configuration (4), MS=160x175 IH IV We end up with 35 lines as before. > First frame without menu bar: > > Frame size history of # 0x63f23d459690> > 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 > menu-bar-lines (2), MS=160x175 > xg_frame_set_char_size, visible, PS=1328x1260, XS=1328x1260, DS=1328x1260 > +values, PS=664x655, XS=664x630 The 630 here are the next strange thing (they existed in all previous runs you reported but I didn't notice them either). For some reason the height of the tool bar is not added when we do not add the one of the menu bar. This must be a bug on our side. > ConfigureNotify, PS=1328x1260, XS=1328x1308, DS=1328x1260 This one is truly remarkable: 1308 is 1258 + 50 and 50 pixels are the height of your menu bar. Why would anyone add the menu bar height here when we just asked to not add neither the height of the menu nor that of the tool bar? > xg_frame_resized, changed, PS=1328x1260, XS=1328x1308 > change_frame_size_1, delayed, PS=1328x1260, XS=1328x1308, DS=1328x1260 > change_frame_size (5), TS=1280x1260~>1280x1308, TC=80x36~>80x37, So this gets us 37 lines, one too many ... > NS=1328x1260~>1328x1308, IS=1328x1260~>1328x1308, MS=32x70 IH IV > tool-bar-lines (2), MS=160x175 > xg_frame_set_char_size, visible, PS=1328x1308, XS=1328x1308 > +values, PS=664x654, XS=664x695 > ConfigureNotify, PS=1328x1308, XS=1328x1176 > xg_frame_resized, changed, PS=1328x1308, XS=1328x1176 > change_frame_size_1, delayed, PS=1328x1308, XS=1328x1176 > change_frame_size (5), TS=1280x1308~>1280x1176, TC=80x37~>80x33, ... here we shrink back to 33 lines ... > NS=1328x1308~>1328x1176, IS=1328x1308~>1328x1176, MS=32x70 IH IV > ConfigureNotify, PS=1328x1176, XS=1328x1292 > xg_frame_resized, changed, PS=1328x1176, XS=1328x1292 > change_frame_size_1, delayed, PS=1328x1176, XS=1328x1292 > change_frame_size (5), TS=1280x1176~>1280x1292, TC=80x33~>80x36, > NS=1328x1176~>1328x1292, IS=1328x1176~>1328x1292, MS=32x70 IH IV ... 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? > Second frame with menu bar: > > 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 This is the usual minimization attempt ... > xg_frame_resized, changed, PS=1328x1260, XS=400x340 > change_frame_size_1, delayed, PS=1328x1260, XS=400x340, DS=1328x1260 > change_frame_size (5), TS=1280x1260~>352x340, TC=80x36~>22x9, ... which succeeds here. There's no good first ConfigureNotify event and no second ConfigureNotify as with the initial frame. The remainder can be ignored. 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. martin