From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#46827: Broken initial size of GTK3 frame Date: Tue, 2 Mar 2021 17:07:16 +0100 Message-ID: References: <6caa020a-084c-e3f2-7a34-262f7127b21b@gmx.at> <87eegz41ui.fsf@gmail.com> <875z2b3srx.fsf@gmail.com> <87ft1fyo88.fsf@gmail.com> <8a346498-e7e3-ca92-e518-86f6fc2c37b7@gmx.at> <87y2f6spgm.fsf@gmail.com> <87v9aaslh9.fsf@gmx.net> <689ba08c-639f-af40-5c30-95dcceac552f@gmx.at> <359cec57-48d3-dc97-df0f-a778a0786001@gmx.at> <83zgzl63y0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------608848008B1759DB3DFB25A4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25121"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46827@debbugs.gnu.org, rpluim@gmail.com, stephen.berman@gmx.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 02 17:08:35 2021 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 1lH7Za-0006N4-1Z for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Mar 2021 17:08:34 +0100 Original-Received: from localhost ([::1]:33700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lH7ZZ-0006gN-3z for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Mar 2021 11:08:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH7Z4-0006e1-I0 for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 11:08:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42502) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lH7Z4-0006ec-9n for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 11:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lH7Z4-0004Yk-4b for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 11:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Mar 2021 16:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46827 X-GNU-PR-Package: emacs Original-Received: via spool by 46827-submit@debbugs.gnu.org id=B46827.161470124817486 (code B ref 46827); Tue, 02 Mar 2021 16:08:02 +0000 Original-Received: (at 46827) by debbugs.gnu.org; 2 Mar 2021 16:07:28 +0000 Original-Received: from localhost ([127.0.0.1]:54048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH7YW-0004Xy-5Z for submit@debbugs.gnu.org; Tue, 02 Mar 2021 11:07:28 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:47287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH7YT-0004Xj-GN for 46827@debbugs.gnu.org; Tue, 02 Mar 2021 11:07:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1614701238; bh=1bCoBj//oeDdLZrom1fVSdQZw2Cz4kkPpWSXKyHYZmg=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=ggVSlYeS4Vh1bHjzgWbquvH5rCA1TB0xfwIsUSA9fbzVpvdhRSjXPrZQvYO9h3l4a XMH9Aj7cVc/B+KNYxLEMlwgzeU+44DxMZ0ezA98U22Uy5IZ2sxzMEDw6JgAMZWlYJL MkAiQRAJydLmza6dkX0B0twob5bJR3ExZbW2yzzc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.156]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mz9Ux-1m3KLt0AZn-00wGyp; Tue, 02 Mar 2021 17:07:18 +0100 In-Reply-To: <83zgzl63y0.fsf@gnu.org> Content-Language: en-US X-Provags-ID: V03:K1:lLdPYYrbNHpRuGtNrR9qsRHqgaz+K3EXxfPXBg+G6TUE5kW4zDA O+awE/s+obCuJBDOASEZVw1Q88EAXijuHVMWyj0Adau+lDnLLh40UfA5GvQwFkkgbx7q4Gn W6ObNDUF8ccisHpBYW9r3SDNB7z5XNlAl2SY1vyXGn5JQ77nfLW1HWlHw0Nnnzt4KU7k1fY fqMD/SxnqlhajjrvrvUqA== X-UI-Out-Filterresults: notjunk:1;V03:K0:7xENMXAElrc=:2Z4bbtsCSk0oubxWxs+X9F 5y1zF29KtRxLZKR/p11g3Tqx1n9Dseu3fDsLCq8E9vZMNTUILr3gi5Xd5WYTIVXyILB719Xsi tL2VjQilCCga6AUs4FDzA71T+OEzs0+qgux+P33CgyDhX9McSQQprRRtLDMrqIsfWQS/IvitQ 1nDyTkBhtBwLAK6BbA8innduj1CnplOI5Qs96Bm1dUtHuOFN6+85Xt46qDigPNaHzN8K0Mjy6 HwvmgR33H0RpRSb5uiIkHTEFFbAXWP5uOq+HdhRI1vOUsxqtP5BJWhjQrJTjMywuFv/ynKnKm 0pyAF3Sxm6Da1CdDieGRMga03r9cAuPtqHi9byOUwt48HvEAivAGxLl9aDtgfbs747DpUDvDH Ep+2DstlS6Mzw1JqmXSgUEFJZwOaNmITvd8vasrvOMDgJJXfaro1pU8uGraAeYi+BDJje8AGz igLeVLaTQwrUDXa+DyuGJf5e7dYVdipLyhoERV8FxWt9i1bfjL5lXUDJc+s0+4rWRsadS4ojJ luFw482re6nrnZOvGgVGvaE1KZJZwtiHTU0J7M5LDlsyMBrVPn+i6SY9iUmF017H6J9nIbCYB 5uawS3FeD9zvvAaDDaoGJGndaIW0ue/0K8IFFUyiQEaBOwD4MlgBiMtNc2/qHHuZv4WT/Yl4/ Echqm80TE7jYgan6EaqZSIkTv6Gl8pFrSo8yN/JroOQy4BinDvOvLnqEX23QvEKyzj+rtMFJE /gXyz7oNV27a/Eo3bhFweG3P5qxp1sV+Npwz7pHfuNoByruiTwCusTHUNxaTpQ2J7DgUVGBM 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" Xref: news.gmane.io gmane.emacs.bugs:201224 Archived-At: This is a multi-part message in MIME format. --------------608848008B1759DB3DFB25A4 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > What's wrong with this place? Actually, it's not needed. I just have to call do_pending_window_change _after_ updating the tool bar as in the attached patch. > But please note that after calling > do_pending_window_change you need to perform the "maybe the selected > window changed" dance we do after other similar calls. I suppose the do_pending_window_change could change the selected_window due to frame resizing which makes the selected window too small. is some sort of cargo cult now. While frame resizing can make the selected window small, it will neither remove nor change it. But since the menu and tool bar code _can_ change the selected window we'll still have to cater for it. > Otherwise, I'm okay with this change, but only on master. Emacs 27.2 > will have to make do with what we have now. Don't worry. Even on master we could condition it on GTK3. I'd just want to find out why it works around the problem in the first place. And I have a second, similar GTK3-only frame resizing problem with a similar effect that, however, becomes virulent only after resizing a frame manually with the mouse. martin --------------608848008B1759DB3DFB25A4 Content-Type: text/x-patch; name="xdisp.c.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xdisp.c.diff" diff --git a/src/xdisp.c b/src/xdisp.c index cc0a689ba3..827a484fc9 100644 =2D-- a/src/xdisp.c +++ b/src/xdisp.c @@ -15650,9 +15650,6 @@ redisplay_internal (void) clear_desired_matrices (f); } - /* Notice any pending interrupt request to change frame size. */ - do_pending_window_change (true); - /* Clear frames marked as garbaged. */ clear_garbaged_frames (); @@ -15660,6 +15657,9 @@ redisplay_internal (void) if (NILP (Vmemory_full)) prepare_menu_bars (); + /* Notice any pending interrupt request to change frame size. */ + do_pending_window_change (true); + /* do_pending_window_change could change the selected_window due to frame resizing which makes the selected window too small. prepare_menu_bars may call lisp hooks and hence also change the --------------608848008B1759DB3DFB25A4--