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: Thu, 14 Nov 2024 23:25:06 +0000 Message-ID: References: <3d0a1e9a-5efc-4491-ab85-e3e58cb0f068@gmx.at> <0e78c0db-105c-4a60-acd4-7267e225259b@gmx.at> <74c278ea-e286-4841-98ed-6ae38cb63980@gmx.at> <3797189d-e13b-4340-9629-80cda5aaaced@gmx.at> <6e166b5c-c570-46f1-9eed-bca1dd06dba4@gmx.at> <93553a3f-20c3-47e3-bad5-161877cec985@gmx.at> Reply-To: Reuben Thomas Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000064ef9c0626e7c361" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35044"; 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 Fri Nov 15 00:27:30 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 1tBjFJ-0008vB-UK for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Nov 2024 00:27:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBjF2-0002cI-5I; Thu, 14 Nov 2024 18:27:13 -0500 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 1tBjEt-0002bz-4p for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 18:27:04 -0500 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 1tBjEs-0001MT-Ry for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 18:27:02 -0500 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=CIYfVmFcPut/8+G/Eb+sTMhenrsSUeRzlFJ7YwH5iUU=; b=GYOXigPqElnOSbQ7nNjfyB7BBF4MuVPNGVA0pjpPp5jyLa0sBKuYf1haQzqmMqZS5fg6AA6mJbS7TCqMrTUcxNBDWtmZ7KljLOL1SwXbg/Ph2Wda4FdGf3WfshdFHFS2X4bSzjF6otsPCxmq01wOj44YnDz5EJmK4P6z/ECn4Qbz6NuUXz5mmC/mP0/lLmNpI7xjPACJzH1pBjqnhBvw7h/2Vfl6GxpmQIhWhYogplxRCl/23duBsVN0N65jJUwID5ncbtGVbMJq0/SmM6NwxQz5LBLv9Av6lhuGWjtxQJBz6Lgfo1rSZgMuU4cMVydoBbbfrDKqmzihFdxceNW27g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBjEs-0001qK-Fs for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 18:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Nov 2024 23:27: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.17316267827037 (code B ref 72986); Thu, 14 Nov 2024 23:27:02 +0000 Original-Received: (at 72986) by debbugs.gnu.org; 14 Nov 2024 23:26:22 +0000 Original-Received: from localhost ([127.0.0.1]:47718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBjED-0001pR-HK for submit@debbugs.gnu.org; Thu, 14 Nov 2024 18:26:21 -0500 Original-Received: from mail-yb1-f170.google.com ([209.85.219.170]:55421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBjEB-0001pI-ES for 72986@debbugs.gnu.org; Thu, 14 Nov 2024 18:26:20 -0500 Original-Received: by mail-yb1-f170.google.com with SMTP id 3f1490d57ef6-e38261653aaso219164276.2 for <72986@debbugs.gnu.org>; Thu, 14 Nov 2024 15:26:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; t=1731626718; x=1732231518; 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=CIYfVmFcPut/8+G/Eb+sTMhenrsSUeRzlFJ7YwH5iUU=; b=Pe+8zLDu7mBzSkqsjm5dPkToAk701tl3A+ABwuhemzdrJ66EoBqov235oSRn28QHxh 2kVGdaoP8aC9eIlWoQGOJ1HRvv6z5oPc/Z6wy/acAPy6x1UCLvBVipQnHYYC/7Fn67BT u5HcKHl5MRnymMORgiVyQEyA4e74zplEzDynM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731626718; x=1732231518; 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=CIYfVmFcPut/8+G/Eb+sTMhenrsSUeRzlFJ7YwH5iUU=; b=GvwV+U3pmZLuSMtb/3Xj8gg6ilfB9dR+j7e+b8ao446ZGE4dXSLgTvR+k3aiUe0d50 X4KBJzXRaW77xccAjOHgSP1gUc1lURQv7ADPn3vcNKP2ejynCsAVTooCBT/yanukhyK2 JVqzhfGgVyrPHspGKL01eFaljoXXW0wzisvhnQWOeLyhiDfawbSb3dlAzcVDgxUgurhJ lnc0QZXyMIeVVYcXd6brwCRpbYHpDpQlOA7xQAE2eKzyL+Opu+kv9/Go9U/y9D9r4y7M HPXM5mKRw2dVDKTKtK6/aY/Rx+G656F5K4cqcDP5LxaFXDdcvhflf1AnkNOQg5MHMjtW FPbQ== X-Forwarded-Encrypted: i=1; AJvYcCVwD/GGKXJVHsItqmqPOq4vnnq6YIAXhXQ7FHUSFu7N2hdRKXjn+gV67wPbKBaY3CQW5jTV0w==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yz2azoP02a6tWpX3sdqI90hwAj+x3wT9yaqbjNEyL1omKSPL/7W 1/HueE1qp5JxFznp1Pk5Vf+e7rmxKCgF1adXZ+1D0HDxmYuGVOhPUY+4bon9rqjXNMIcPgx7pWr uQY13k1yrWdOiNWmjSUhQ6+Z0oFbtih2zKGTtHg== X-Google-Smtp-Source: AGHT+IFWiwOatDimPIfYr0btQBmhN1M69vj1G9yrWk1iuyH4HL49WHYCaW2din/X6gUSPFU5RfLCDGvZYhPs1fAIgXE= X-Received: by 2002:a05:690c:d95:b0:6e3:3dbc:ca60 with SMTP id 00721157ae682-6ee55a4e1edmr10980347b3.8.1731626717728; Thu, 14 Nov 2024 15:25:17 -0800 (PST) In-Reply-To: <93553a3f-20c3-47e3-bad5-161877cec985@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:295374 Archived-At: --00000000000064ef9c0626e7c361 Content-Type: text/plain; charset="UTF-8" On Thu, 7 Nov 2024 at 09:49, martin rudalics wrote: > > One problem I see is that in emacsgtkfixed.c we set up the preferred > size of the frame widget and take the width and size from our > min_width/min_height size hints. From the mutter log we know that these > are broken so maybe GTK does something weird with them. Please put > breakpoints at the lines > > if (minimum) *minimum = w; > > and > > if (minimum) *minimum = h; > > within the #else parts of emacs_fixed_get_preferred_width and > emacs_fixed_get_preferred_height in emacsgtkfixed.c and tell me which > values are assigned here: Once for a good scenario and once for a bad > one. Here I get 0 initially and later on 110 for h and 90 for w. > Just to check I've understood what you want here, I did a first run with the latest gtkutil-frame-2.diff applied, and with breakpoints on those two lines, of simply "emacs -Q", and I get, for just opening the initial window, 4 hits on each breakpoint. The first hit is w = 0, h = 0. The other three are w = 64, h = 167. I wasn't exactly sure what you meant by a "good" or "bad" scenario; but I guess you meant "good" == "with patch applied", and "bad" == "without patch applied"? -- https://rrt.sc3d.org --00000000000064ef9c0626e7c361 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, 7 Nov 2024 at 09:49, martin rudal= ics <rudalics@gmx.at> wrote:

One problem I see is that in emacsgtkfixed.c we set up the preferred
size of the frame widget and take the width and size from our
min_width/min_height size hints.=C2=A0 From the mutter log we know that the= se
are broken so maybe GTK does something weird with them.=C2=A0 Please put breakpoints at the lines

=C2=A0 =C2=A0if (minimum) *minimum =3D w;

and

=C2=A0 =C2=A0if (minimum) *minimum =3D h;

within the #else parts of emacs_fixed_get_preferred_width and
emacs_fixed_get_preferred_height in emacsgtkfixed.c and tell me which
values are assigned here: Once for a good scenario and once for a bad
one.=C2=A0 Here I get 0 initially and later on 110 for h and 90 for w.
<= /blockquote>

Just to check I've u= nderstood what you want here, I did a first run with the latest gtkutil-fra= me-2.diff applied, and with breakpoints on those two lines, of simply "= ;emacs -Q", and I get, for just opening the initial window, 4 hits on = each breakpoint.

The f= irst hit is w =3D 0, h =3D 0.

The other three are w =3D 64, h =3D 167.

<= /div>
I wasn't exactly sure what you meant by a = "good" or "bad" scenario; but I guess you meant "g= ood" =3D=3D "with patch applied", and "bad" =3D=3D= "without patch applied"?
=C2=A0
<= span class=3D"gmail_signature_prefix">--
--00000000000064ef9c0626e7c361--