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: Sat, 26 Oct 2024 19:40:19 +0200 Message-ID: <3797189d-e13b-4340-9629-80cda5aaaced@gmx.at> References: <4666bf6d-6259-4f72-a65d-56e2c47f98c0@gmx.at> <54072426-c373-420c-8343-29035fba25a6@gmx.at> <3d0a1e9a-5efc-4491-ab85-e3e58cb0f068@gmx.at> <0e78c0db-105c-4a60-acd4-7267e225259b@gmx.at> <74c278ea-e286-4841-98ed-6ae38cb63980@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="19372"; 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 Sat Oct 26 19:41:53 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 1t4knP-0004vP-W7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Oct 2024 19:41:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t4kn4-0006F7-C3; Sat, 26 Oct 2024 13:41:30 -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 1t4kn2-0006Er-PB for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 13:41:29 -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 1t4kn2-0002Q4-Fv for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 13:41:28 -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=M0K0BFUzikd81qocEfQaJGEgx/w0VZc2Nm2TBsinU2o=; b=IhIHXyctRsl1DlI65F3BHFYnHPhND37H9dlcoquKavaLEUrfaChI3ONHVfwl9ufPJRu8MTBpUoaBALZzS6rY4++GMbK0KiDtm0W5KyHZM4q3RAtDX0agVPXS1xWiAlsSR+RnoXCQC8120fYQZwyGx6ZbQq8K5uXqKQUEGwZHu9oxaTrxmZPms6dYx6x2fwSl1LqVHR/Yfp5LdNc+vNcaUHpSQqskoRD9rZAAT9h4zE21jVQ+CnUUyxyVsGulKbBDRjF8L3qvHHydfWwztLJl5SxPMHhyTjkoJP13ZyUugyUt8RJ3cERbG101b2Em3lwB8AQWPWg19n3AzKWZCLKgzQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t4knZ-00018b-Rb for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 13:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Oct 2024 17:42:01 +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.17299644744301 (code B ref 72986); Sat, 26 Oct 2024 17:42:01 +0000 Original-Received: (at 72986) by debbugs.gnu.org; 26 Oct 2024 17:41:14 +0000 Original-Received: from localhost ([127.0.0.1]:42479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4kmn-00017I-E5 for submit@debbugs.gnu.org; Sat, 26 Oct 2024 13:41:13 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:38753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4kmk-000172-T3 for 72986@debbugs.gnu.org; Sat, 26 Oct 2024 13:41:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1729964425; x=1730569225; i=rudalics@gmx.at; bh=M0K0BFUzikd81qocEfQaJGEgx/w0VZc2Nm2TBsinU2o=; 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=gdCCaeV38wtucyhVpP1++TxDuJN6SggXknHRRcAg/YGr/obCsrlSd7rj1WYpe/FI Bq1cayEE6HC4CT1tek4ORhdPEM4oLg7Am8XZONLAjvw4Od3710e3HKNxAnOctQmrg A+FBqncJxT1FQOsWAG+WBo8Txju9r9oqGGapjgM6Y8TnLxJPFT6nGfW+BBSqUXYm9 AhOZzoWbES87oSdxS5gu0aDk+m50PKX1KNh3Of++KorUkIqfhj7jtwVYGo24onC5j K/8roduikEr6T+PJGafVeH8WAVWrrOgsLJ3KRl8rN5ebtvwuo/JW3Gm8mCybCE1aQ 8FZOClzthIuBSBYb/Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([46.125.249.11]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MFbRs-1t6Nsd1OG6-00BpOv; Sat, 26 Oct 2024 19:40:25 +0200 Content-Language: en-US In-Reply-To: X-Provags-ID: V03:K1:hkTSGDnAwUAr4cLmN/f8xGToWDmrCjILDpcZpMKmKJxdNJctft0 LhSK1yoqKUE1nAKuQGKA67zwVMZGd3KQwmZ3ujM/PjxW5w2f+EresozkmI8I8td+iKR0gQN ZFI/z8gH34R7Awg+HU59MESfuy2YtP5S2AvxOUsPZ4XyLOGHKI4rOF+JXm+x16eiCQq1rEG 7buZhY3QPcMF9HF05+3SQ== UI-OutboundReport: notjunk:1;M01:P0:y4uS8Subzvg=;zBzwxsLNpB3TSA69QJ1ogGnK8Ep drAIc3HvMKtNLJCxpxrGCUzHnpVpNfmKw4jVrgrl8IUw5UJNHrveAKk1MwPWVh7WZqTvZqHev bMeY5YMp53IR1mFqA4KNhuRZ6GUMfGUhMEgG0dwm4O9Ezdc+UZs3fzlLZJWeQWURWi4g/G0wJ gSO0ccYCWG3EtBUNLEoqP20XFwMadT9TI0//bWfDQiBr1fR+Y5wH2v555pNyF9IZ5XmmSRTtS u06H4NzFeGHASjlkjP61ijNNZS5MxA8+d6A+fTZPtoUu5byVfE6Vtd75Cs3CcZz9/G3ry3giL UvmpY3zkZ2dYWu90xLPCH5ln5mT+dUylDyixmrWclcjx8s9X1jZItvqO3BLHoelWbLjEz2MzM QKQmWk2l6NRn6PWnD2OCHiUDbC12ohW6CYrEXwwiYD1psEMnF05n+mMbtb26YLE0oN41McjBN v77UyT0jKkmH+3Kpcg8LEwshmn+aR/bp/ZSDq3D0kxruNZPX5Tv5FLE+TSr2FZJEQS1cpW8ad qGgf/cgcjMAksz11c122/nup38dsb/aLBmLVVr9z9k3AiGx1SBiaxTQXhnXOF35r3T48dxJzI pEfbxQXRmdP/yyzU/0y45gvp0btbGetX/KUBOtGIr7CY/dFwUr+RCItTDezkHs5Mv0i5QFLcx XZGWTrCTjglberKytEVJDHIhCLLLeVjE8ff9KvOgWKfbOX0RGQvxTsudmj6WsaOSrT03j7Jwc k4Pot4cm6+iMbMswyO7f35ctj7iiQ8wPXuQ67H6SZghlZ/BhFbt6RYgL73hTPWY46C9EyDyb 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:294288 Archived-At: > It's possible to turn on debug topics in Mutter at run-time using the > built-in Looking Glass debugger (`lg` from "Run Command" prompt). Thanks, you saved my day. I should have found out about 'lg' myself but didn't see it wherever I went. > Having done this, I can see the output in journalctl. > > Using xwininfo, I found that the first window is ID 0x5000148 and the > second window I opened is ID 0x500031c. Just to make sure: The first window is the initial window Emacs made with normal size and the second window the one you make via C-x 5 2 with the menu bar still enabled and the abnormal size. Correct? > Then, the logs show, grepping for the first ID: > > Oct 26 13:33:47 ecls gnome-shell[3227]: GEOMETRY: Constraining 0x5000148 in > move from 50,108 1328x1430 to 50,108 1328x1430 > Oct 26 13:33:47 ecls gnome-shell[3227]: GEOMETRY: Window 0x5000148 has > height_inc (34) that does not evenly divide min_height - base_height (340 - > 116); thus > This and all the following complaints are probably correct. I'm aware that our sizes hints are incorrect and with 'lg' we can hopefully fix them now. But IIUC mutter only complains but does not react in any malevolent way. What surprises me is that for the first frame there's no "Sending synthetic configure notify" entry. We'll have to find out why. > and for the second ID: > > Oct 26 13:33:48 ecls gnome-shell[3227]: GEOMETRY: Constraining 0x500031c in > move from 130,188 400x512 to 130,188 400x512 What surprises me most is that here we start already with a size constrained to 400x512. Where would that come from? Basically, it means whatever causes the frame to shrink must have happened before mutter writes out the first log entry. > Oct 26 13:33:48 ecls gnome-shell[3227]: GEOMETRY: require_titlebar_visible > for 0x500031c toggled to TRUE This one is strange too. Why on earth would we turn the title bar on here ... > Oct 26 13:33:48 ecls gnome-shell[3227]: GEOMETRY: Sending synthetic > configure notify to 0x500031c with x: 130 y: 244 w: 400 h: 374 > Oct 26 13:33:48 ecls gnome-shell[3227]: GEOMETRY: Constraining 0x500031c in > move from 0,58 400x430 to 0,0 400x456 > Oct 26 13:33:48 ecls gnome-shell[3227]: GEOMETRY: Setting > _NET_FRAME_EXTENTS on managed window 0x500031c to left = 0, right = 0, top > = 56, bottom = 0 > Oct 26 13:33:48 ecls gnome-shell[3227]: GEOMETRY: require_titlebar_visible > for 0x500031c toggled to FALSE ... and off here? > Oct 26 13:33:48 ecls gnome-shell[3227]: GEOMETRY: Constraining 0x500031c in > move from 0,0 1328x1258 to 0,0 400x456 This one is the most interesting entry here: Somehow we must have got through with our idea of a 1328x1258 frame (which should IMHO mean that GTK could not possibly have intercepted it as with the earlier ones) but mutter immediately constrains it back to 400x456. I'd guess from this that mutter _is_ responsible for the shrinking albeit in consensus with GTK. > Oct 26 13:33:48 ecls gnome-shell[3227]: GEOMETRY: Window 0x500031c sets min > height to 0, which makes no sense Likely another silly size hint we generate. > These traces include the "Sending synthetic configure" message you > mentioned, hopefully helpful! > > (At least good to know that it's easy to turn on debugging in a production > build.) It's more. For the first time I see a way to guess how mutter proceeds. Can you please do the same you did above for a Lucid, Motif or a --with-x-toolkit=no build - the one you find most convenient to build. Maybe by comparing the logs we can understand better. Thanks, martin