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: Wed, 4 Sep 2024 10:01:46 +0200 Message-ID: References: <86ttex6iv0.fsf@gnu.org> <062bf084-741b-4d60-b9de-c62d62a79807@gmx.at> <7b6a5b97-fb0c-4eb0-a5b8-78b6ad5002d9@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="32330"; 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 Wed Sep 04 10:03:20 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 1slkz0-0008E6-Vt for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Sep 2024 10:03:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slkyl-0006SI-S3; Wed, 04 Sep 2024 04:03: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 1slkyi-0006S3-6S for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2024 04:03: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 1slkyg-0006xY-Ou for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2024 04:02: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=nr8HUn6m9PjZWJRLKf46ffsraPonGuQ+yPULxYm6sSg=; b=eLckLb2dX+c6yk7B5W3TOGboqxeY8bLlD/3jiIAL2kF3LOJxbZHRena+YPRqzKyaVHSU/I+LAAFHuBQ1CNep0il+Zu0wJoZGKRP2tQQ5eATP3cTa0qCItE9jJPPVshg7CQXFHLgh1LOehddUSRlyrsaGv4EmvLW6krXZhwY4hQDPIMvm698ibpWSlHT5JJj0lyeMbkGTDsBQJKrCyV2IzDT3o2/hg5y6pMWaAkjRNnODj8Npr+ThFRrjTQLz9AqM4e0676HDAc4+f7Ada+NHsVws8dj1Eo5aMx8q6pRsdVbIFa9/+uzed2UIpQHW6yZzeCqUB8vMPivHY5r+HrSlmA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slkzi-0000jA-13 for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2024 04:04: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: Wed, 04 Sep 2024 08:04: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.17254369962727 (code B ref 72986); Wed, 04 Sep 2024 08:04:01 +0000 Original-Received: (at 72986) by debbugs.gnu.org; 4 Sep 2024 08:03:16 +0000 Original-Received: from localhost ([127.0.0.1]:33339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slkyx-0000hv-MR for submit@debbugs.gnu.org; Wed, 04 Sep 2024 04:03:16 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:41099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slkyv-0000hf-9Y for 72986@debbugs.gnu.org; Wed, 04 Sep 2024 04:03:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1725436914; x=1726041714; i=rudalics@gmx.at; bh=nr8HUn6m9PjZWJRLKf46ffsraPonGuQ+yPULxYm6sSg=; 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=h41Gw6VrfXmpy/Hq8klcHaKFH6neDRIk6N7/7TS4u6RO7b3Dg3FAbyoZ5YW3JTeB kklTSZeywvb7U26Ndq9RuqLIxOx4A0dpe0wdLfRP+z7jl7yttRQDdhXUBhGVVd2sx +Y6iP+Al+PGS4ByNO3fP0/qSKCl8CiqXmMKylR+ARIu7/ehjBm2Bg5uSoSfQVAyNs 0Cd0YGtjI4XkWwNj3OdIfs9iYCa66GmxVXm5Wb+EcRKN/mnHfS1mFBkX0TZRkVNur aeX8gVjwqudKQyMvZkabBQ+eDfWA7H/rm0y1qjaNAc8tDN2MqI0ilCa4LENgrQAvB de0zx3DdCqE4tcpRiA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([213.142.96.184]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M5fIQ-1sfhDU21TW-007F9f; Wed, 04 Sep 2024 10:01:54 +0200 Content-Language: en-US In-Reply-To: X-Provags-ID: V03:K1:sz97XYWH3vc5SMtpoGd7DiLREVG6kSSMvtRG431irIvo97cEl/R D6ANH3YKDTkaesxAypY6E9s4Eok1Aa4knVF8PTumt0SvUKa3qtV7+VNIXUwEsJazQFLSiIq ZiGAswrOJ5jTtCjp/TF3aqrgWRzCNbSRzlYYGxhxEZx1dsgWrnZY0h1UVPIacPSs5MpAj8V HJKH/IW7ZKnNltCwgfh1A== UI-OutboundReport: notjunk:1;M01:P0:N+VfNaURtsY=;1WfP/yAh1TPASpDoOpfXxAm1qfL oScTZCBLmADYj8sCEEpfU9f1DIs9xc8KnugFfYyZo/9w3LUxKiJlrKQ5JONI4jies0DcJbuRk Y1W4gjebGTL1MBzBN3g8/AWK4RGLYOfFol/jSw5/OxNigSoH5IozS6R32anesonR7e23kWqx/ wfgCxEClkVforq8MO6oq5v/bXnHkeOAv1IcTtv9QxOBvYAvKowwFfZQX8YjOvvR0qBxB0joyz b+qAaBLrkEHmYcqXypA8c7d84iTfGcT8w3ypJ81D4XNi4/OMtWjkxLD9AqGL6JeX9PFfhnYqW 86hEtvTYGyPBn7+ZYiEIDP63hyG8rVZNkascnIV8dUT0VD5wIHPevXGm/cd3B0Lg74wGKnY05 T+Eoy9IG9IPA8R0j+NND7spAyBoRScE+e0m+uaLUar7BXvjePLfkhYpwDq/f4Qc3AJHXNsyIX +bHaK2Vptg5C5ooFvf9gO8zIBvvQqNepknzZCWGHt9CQ+Ded71/QUbDfiM71IsgsJAGc3Pwgm nDed9QZvPv9gRpzAkTW0+MmCEY8uGgQpsiKOn4j/H1vvoJBzN3p4t57V4YBHRNuOiL1R2Q1EK D2IOa2/oqIpxkVoXF151+LsFJBdD7RRNbwlSVXv9pJqafU6mpDoHVkNLIkxuUUUBYDATH8HsQ LF9HHPBb5CqYnGWol3JXQUgK50nQx8JJb9O0yEydTJEVHWQDHjVkE+31deTxJXcprQm/AxV2x GfYuoMTT4uQEw8C4LrXQqjUKuhfkCZMwcbJ4vMxyo8We4qTsKdUYb9Z8k9iZaLtsULSBo8FP 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:291184 Archived-At: >> Thanks. The geometry values are consistent with what you described. >> This seems to be Bug#67654 and Bug#68463 and possibly Bug#65559. When >> you run Emacs from a console or under gdb can you observe whether it >> triggers a >> >> gtk_distribute_natural_allocation: assertion 'extra_space >= 0' failed >> > > Yes, both with Emacs 29 and git master produce this message when > menu-bar-mode is non-nil, and the menu bar is drawn, in both window sizes > (the normal sized window, and the strangely small one). But you can't see this message when building with gtk-2 I presume. > The one really notable difference to the above bugs is that the 29 >> version makes a shrunk frame only after you've removed the menubar while >> master makes a shrunk frame immediately. Are the GTK versions of the >> Emacs 29 build and the master build the same? >> > > Yes, they are identical: gtk 3.24.41, Ubuntu build. This strongly hints that there was an Emacs change affecting gtk-2 _and_ gtk-3 builds in between 29 and master. I could imagine that commit e087c89b1e243bbd941a4a50b4bf99613e13d016 is involved but if you could try to bisect, it would be of great help. > Just to make sure one thing: Would setting >> 'frame-resize-pixelwise' to t change anything? >> > > So, I did (setq frame-resize-pixelwise t), then disabled menu-bar-mode (in > Emacs 29), then C-x 5 2 (in both Emacs 29 & git master), and the new window > was small, just as before. It seems therefore to make no difference. Which should eliminate the possibility that our size hints are responsible. IIRC mutter is very severe when size hints are not set up correctly. > Otherwise I would try to build Emacs with gtk2, lucid or motif. > > > I tried building Emacs git master with gtk2, and it doesn't fix the > problem: the second window opened is slightly smaller than before (i.e. > very small indeed). This would eliminate earlier conjectures that changes from one gtk-3 version to another would be responsible. And it would exclude emacsgtkfixed.c as possible culprit. > Building with lucid does fix the problem (both with menu-bar-mode enabled, > and disabled). I suppose that all these problems happen when requests travel from GTK to mutter and back. Basically, mutter is not obliged to fulfill any size or position request for any top-level (non-child frame). BTW, could you try adding a (user-size . t) member to 'default-frame-alist'? And could you try doing that from an 'early-init.el' file? martin