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: Sun, 15 Sep 2024 13:40:36 +0100 Message-ID: References: <4c2fe23a-be76-4cdc-8f97-16197e1834b0@gmx.at> <300cb820-d6b7-44c6-8609-fa7804babf99@gmx.at> <56840844-930e-45b0-ae48-97b5875c51b9@gmx.at> <7c94c78e-5ffd-4a41-948a-8e1a2ccefb91@gmx.at> <4af02761-273f-41dd-b257-37c37ded0fb4@gmx.at> <9bbb10e9-208f-4d03-87f1-6e63ee293ed5@gmx.at> Reply-To: Reuben Thomas Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000077e1d062227c404" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29723"; 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 Sun Sep 15 14:43:19 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 1spob0-0007aU-H4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Sep 2024 14:43:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1spoac-0003Zq-Bq; Sun, 15 Sep 2024 08:42:54 -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 1spoaY-0003Yc-HE for bug-gnu-emacs@gnu.org; Sun, 15 Sep 2024 08:42:51 -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 1spoaY-00027i-8L for bug-gnu-emacs@gnu.org; Sun, 15 Sep 2024 08:42:50 -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=jrK39enNPTWZyjApGFwKt8JCWnG4CKO7UzLzqLt+omQ=; b=R2xQ4jf74UkxV10uv18HoGJOZRYm85/F2XRKffAA0wEwSeikf+4l9VCb+eWDu+S324Kmjvxao1sRYIEYB3XrVmfrLI/QMsnWtpHxyBNCsW/O79dCydzABDv3PRIfwDmH+66o0jsdPYKHISMsG3TVs+teOdDC8NuHPyHI+AJiMsH5JnEhmOg0hrPNIN045Zh+JqGvZkF6A1CXDptcsAArkQRURysHqR8BZmIvUeN2+Vy39BfnL0y7C+c8jSWbjEVoq2oSeg0Bk0UPYNejX7cRgpYu9YH35KI5lcDHAfmDo/kvjva3FubpQzCbPXO+v5mABU8NqHV4/+aM5alf8jnCKA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1spoaj-0001zy-Ox for bug-gnu-emacs@gnu.org; Sun, 15 Sep 2024 08:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Sep 2024 12:43: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.17264041287603 (code B ref 72986); Sun, 15 Sep 2024 12:43:01 +0000 Original-Received: (at 72986) by debbugs.gnu.org; 15 Sep 2024 12:42:08 +0000 Original-Received: from localhost ([127.0.0.1]:48585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spoZs-0001yY-59 for submit@debbugs.gnu.org; Sun, 15 Sep 2024 08:42:08 -0400 Original-Received: from mail-yw1-f182.google.com ([209.85.128.182]:53702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spoZq-0001y0-2W for 72986@debbugs.gnu.org; Sun, 15 Sep 2024 08:42:07 -0400 Original-Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-6ddccc408e1so853087b3.3 for <72986@debbugs.gnu.org>; Sun, 15 Sep 2024 05:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; t=1726404048; x=1727008848; 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=jrK39enNPTWZyjApGFwKt8JCWnG4CKO7UzLzqLt+omQ=; b=J0aIBS+nbIUBQFcbnHUka7muktAse1LJwq0ytkxUOClm2UPrS2VfMCqFZhhLFpFGnY jPudibXxFOdt6w8u5nntwJaRk2joImLkvD/rt5NyMHO7J6O2wxquWfMiXhe9ACy51IFP HYRtQHWRs/I5A00OEVYuLjewRMHwZmdS/Ryjk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726404048; x=1727008848; 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=jrK39enNPTWZyjApGFwKt8JCWnG4CKO7UzLzqLt+omQ=; b=vWcZ6ydYc4eelLd3WNNiRhlK27+qHhLCOcboQDXwp0+uKABV+Mh7m64NxLlmYZaxO3 VyUWa5JzXmCm+QuGz7fl1F/T3DBWWlUK+Wkfr0eWz7H38FykVwNxFFOFKiDaU2EMxSAJ rnZuvXLOOfPJmfvOYn35PEw6qYGkPtfIbiso4H0QP8868QFeX+UV0Q0jBH5ncI9ipd3m tCAVAyj4CP9dgKxyiCz0QGK1jXKUabt007vpFpC8SOM7t0D8LCkJPr4MTBQhccoIWu+h 8p+lmDyNaEiziKrUij2q+yHF10i/bZFRaZXAhhW6QTe5sRtbYVVtpqbVEh/sjRi6zRGs nOcQ== X-Forwarded-Encrypted: i=1; AJvYcCVDNqP6+4Al3olJdjL3AZoLFgMgdAWN8vlFSsyB/FTTKYqcO76v+BE5iZOWPXaAfVJtBq/rFQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YysFrUUmfEi1J0vd95jbvl0AhWSAnBHzBJEoMZalXiHbKCC9KOb yeKx47TcAVdSDhlFNZSJv4RQnk1uCnU1ncQ1phuu445fACi/OhJMuy8S/+mb1TqEoaUdo5zwaKX 1Tzb04HZ+TyIp4zoEb6pXcN+4NOHe4RHIBola/A== X-Google-Smtp-Source: AGHT+IEzj5aI7VCCtoonH0bJ7C5kE02wdc9A9mAF58d43cIoIOtgy06STJbjRG+/uvC6pgOYZXo9qkZSkXRQgfNpteM= X-Received: by 2002:a05:690c:60c1:b0:683:37a8:cd77 with SMTP id 00721157ae682-6dbcc5566d1mr67661167b3.29.1726404048147; Sun, 15 Sep 2024 05:40:48 -0700 (PDT) In-Reply-To: <9bbb10e9-208f-4d03-87f1-6e63ee293ed5@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:291850 Archived-At: --000000000000077e1d062227c404 Content-Type: text/plain; charset="UTF-8" On Sat, 14 Sept 2024 at 15:43, martin rudalics wrote: > > Just that the "first version" of this patch had another problem: The > sizes we ask for in gtk_window_resize via outer_height and outer_width > include tool and menu bars. The sizes reported by ConfigureNotify are > those of the native rectangle only. I hopefully fixed that now. Please > try again and tell me the histories you get here for the initial frame > and the second frame both with and without the menu bar by evaluating > (frame--size-history). > History without 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 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=400x374, DS=1328x1260 xg_frame_resized, rejected, PS=1328x1260, XS=400x374, DS=664x630 tool-bar-lines (2), MS=160x175 xg_frame_set_char_size, visible, PS=1328x1260, XS=1328x1260, DS=1328x1260 gvalues, PS=200x187 ConfigureNotify, PS=1328x1260, XS=1328x1258, DS=1328x1260 xg_frame_resized, rejected, PS=1328x1260, XS=1328x1258, DS=664x671 set_window_configuration (4), MS=160x175 IH IV History 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 xg_frame_resized, rejected, PS=1328x1260, XS=400x340, DS=664x655 tool-bar-lines (2), MS=160x175 xg_frame_set_char_size, visible, PS=1328x1260, XS=1328x1260, DS=1328x1260 gvalues, PS=200x195 ConfigureNotify, PS=1328x1260, XS=1328x1258, DS=1328x1260 xg_frame_resized, rejected, PS=1328x1260, XS=1328x1258, DS=664x696 set_window_configuration (4), MS=160x175 IH IV Next I'd like to know what you see with > > (let ((frame (make-frame '((visibility . nil))))) > (make-frame-visible frame)) > > and > > (let ((frame (make-frame '((visibility . nil) (menu-bar-lines . 0))))) > (make-frame-visible frame)) > > both with an unpatched Emacs and a patched one. Here the second frame > appears exactly where the first one is, so we would have to care about > the placement ourselves. > Unpatched Emacs: both expressions create a small second frame in the top left-hand corner of the screen. Patched Emacs: both expressions create a small second frame in the top left-hand corner of the screen that immediately jumps to being the correct size. -- https://rrt.sc3d.org --000000000000077e1d062227c404 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, 14 Sept 2024 at 15:43, martin rudalics <rudalics@gmx.at> wrote:

Just that the "first version" of this patch had another problem: = The
sizes we ask for in gtk_window_resize via outer_height and outer_width
include tool and menu bars.=C2=A0 The sizes reported by ConfigureNotify are=
those of the native rectangle only.=C2=A0 I hopefully fixed that now.=C2=A0= Please
try again and tell me the histories you get here for the initial frame
and the second frame both with and without the menu bar by evaluating
(frame--size-history).

History without menu bar:

Frame size history of #<frame =C2=A0*Minibuf-1* 0x6220fb2af828&= gt;
x_create_frame_1 (5), TS=3D80x25~>1280x875, NS=3D80x25~>1296x8= 75, IS=3D80x25~>1296x875, MS=3D32x70 IH IV
gui_figure_window_size (5)= , TS=3D1280x875~>1280x1260, TC=3D80x25~>80x36, NS=3D1296x875~>1296= x1260, 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
x_create_frame_2 (0), MS=3D160x1= 75
xg_frame_set_char_size, invisible, PS=3D1328x1260, XS=3D1328x1260, DS= =3D1328x1260
xg_frame_set_char_size (5), MS=3D32x70 IH IV
x_make_fram= e_visible
MapNotify, not hidden & not iconified, PS=3D1328x1260, DS= =3D1328x1260
ConfigureNotify, PS=3D1328x1260, XS=3D400x374, DS=3D1328x12= 60
xg_frame_resized, rejected, PS=3D1328x1260, XS=3D400x374, DS=3D664x63= 0
tool-bar-lines (2), MS=3D160x175
xg_frame_set_char_size, visible, P= S=3D1328x1260, XS=3D1328x1260, DS=3D1328x1260
=C2=A0gvalues, PS=3D200x18= 7
ConfigureNotify, PS=3D1328x1260, XS=3D1328x1258, DS=3D1328x1260
xg_= frame_resized, rejected, PS=3D1328x1260, XS=3D1328x1258, DS=3D664x671
se= t_window_configuration (4), MS=3D160x175 IH IV

=
History with menu bar:
Frame size history of #<frame =C2=A0*Minibuf-1= * 0x56319385af48>
x_create_frame_1 (5), TS=3D80x25~>1280x875, NS= =3D80x25~>1296x875, IS=3D80x25~>1296x875, MS=3D32x70 IH IV
gui_fig= ure_window_size (5), TS=3D1280x875~>1280x1260, TC=3D80x25~>80x36, NS= =3D1296x875~>1296x1260, IS=3D1296x875~>1296x1260, MS=3D32x70 IH IVscroll-bar-width (3), NS=3D1296x1260~>1328x1260, IS=3D1296x1260~>132= 8x1260, MS=3D160x175
scroll-bar-height (3), MS=3D160x175
menu-bar-lin= es (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
MapNot= ify, not hidden & not iconified, PS=3D1328x1260, DS=3D1328x1260
Conf= igureNotify, PS=3D1328x1260, XS=3D400x340, DS=3D1328x1260
xg_frame_resiz= ed, rejected, PS=3D1328x1260, XS=3D400x340, DS=3D664x655
tool-bar-lines = (2), MS=3D160x175
xg_frame_set_char_size, visible, PS=3D1328x1260, XS=3D= 1328x1260, DS=3D1328x1260
=C2=A0gvalues, PS=3D200x195
ConfigureNotify= , PS=3D1328x1260, XS=3D1328x1258, DS=3D1328x1260
xg_frame_resized, rejec= ted, PS=3D1328x1260, XS=3D1328x1258, DS=3D664x696
set_window_configurati= on (4), MS=3D160x175 IH IV

Next I'd like to know what you see with

(let ((frame (make-fr= ame '((visibility . nil)))))
=C2=A0 =C2=A0(make-frame-visible frame))

and

(let ((frame (make-frame '((visibility . nil= ) (menu-bar-lines . 0)))))
=C2=A0 =C2=A0(make-frame-visible frame))

both with an unpatched Emacs and a patched one.=C2=A0 Here the second frame=
appears exactly where the first one is, so we would have to care about
the placement ourselves.

Unpatched Emacs: both expressions create a small second frame in the t= op left-hand corner of the screen.

Patched Emacs: both expressions create a small second frame i= n the top left-hand corner of the screen that immediately jumps to being th= e correct size.

--
--000000000000077e1d062227c404--