From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44794: 28.0.50; Frame creation broken with (tool-bar-mode -1) Date: Sat, 19 Dec 2020 12:42:22 +0200 Message-ID: <83zh2at6up.fsf@gnu.org> References: <838satxufx.fsf@gnu.org> <83o8jpw813.fsf@gnu.org> <83lfetw4bf.fsf@gnu.org> <83tuspczbw.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40280"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefan@marxist.se, 44794@debbugs.gnu.org To: David Fussner , martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 19 11:43:26 2020 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 1kqZhu-000ANr-GI for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 11:43:26 +0100 Original-Received: from localhost ([::1]:46478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqZht-0004cK-E8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 05:43:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqZhV-0003zI-Un for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 05:43:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57553) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqZhV-00038J-Lm for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 05:43:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kqZhV-0001rG-JE for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 05:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Dec 2020 10:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44794 X-GNU-PR-Package: emacs Original-Received: via spool by 44794-submit@debbugs.gnu.org id=B44794.16083745677122 (code B ref 44794); Sat, 19 Dec 2020 10:43:01 +0000 Original-Received: (at 44794) by debbugs.gnu.org; 19 Dec 2020 10:42:47 +0000 Original-Received: from localhost ([127.0.0.1]:40866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqZhH-0001qo-GA for submit@debbugs.gnu.org; Sat, 19 Dec 2020 05:42:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqZhG-0001qZ-EP for 44794@debbugs.gnu.org; Sat, 19 Dec 2020 05:42:46 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54034) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqZhA-00031R-I1; Sat, 19 Dec 2020 05:42:40 -0500 Original-Received: from [176.228.60.248] (port=4266 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kqZhA-0004FK-2G; Sat, 19 Dec 2020 05:42:40 -0500 In-Reply-To: (message from David Fussner on Sun, 13 Dec 2020 21:22:29 +0000) 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:196375 Archived-At: > From: David Fussner > Date: Sun, 13 Dec 2020 21:22:29 +0000 > Cc: Stefan Kangas , 44794@debbugs.gnu.org > > I'm sorry I haven't been clear enough. The original bug -- the empty > new frame, with only a title bar, menu bar, and scroll bar, but with > an empty main window and no mode line or minibuffer -- still occurs > even after clearing the kwin setting I mentioned. Kwin was responsible > for the mistake I made in my original bisection, which showed that > Stefan's commit (36431e1679) was the first to produce the bug. In > fact, Stefan's commit only revealed a bug that had been produced, I > believe, by J Scott Berg's earlier commit (2c0cd9008) which altered a > test in xterm.c (l. 8950). That revised test, when I stepped through > the code, fails to trigger a resize when there is no tool bar, though > it does trigger a resize when there is a tool bar. (The old test, > pre-2c0cd9008, triggers a resize in both situations.) For reasons that > are still obscure to me, without that resize all text in the main > window is invisible after the creation of the new frame, and remains > so until I manually resize the frame. Compiling with different > toolkits and with or without cairo drawing affects whether the bug > appears or not, but in the default gtk3 + cairo build the bug is still > present, even without the spurious kwin setting. As I understood the > thread concerning bug #44002, that fix was not regarded as obviously > safe, and was therefore reserved for master. I'm suggesting, > therefore, that at least in my case that fix isn't safe, though it > would appear that I'm the only user running master who has run into > such an issue. I had hoped that someone might have an idea of how to > fix J Scott Berg's fix so that it worked both for vcxsrv and for > 32-bit slackware 14.2. (None of my attempts have worked). Thanks. Does the patch below give good results? Martin, given what was found during investigation of bug#44002, do you agree the below should avoid re-introducing that bug? diff --git a/src/xterm.c b/src/xterm.c index 3de0d2e..7f8728e 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8947,7 +8947,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (!f && (f = any) && configureEvent.xconfigure.window == FRAME_X_WINDOW (f) - && FRAME_VISIBLE_P(f)) + && (FRAME_VISIBLE_P(f) + || !(configureEvent.xconfigure.width <= 1 + && configureEvent.xconfigure.height <= 1))) { block_input (); if (FRAME_X_DOUBLE_BUFFERED_P (f)) @@ -8962,7 +8964,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, f = 0; } #endif - if (f && FRAME_VISIBLE_P(f)) + if (f + && (FRAME_VISIBLE_P(f) + || !(configureEvent.xconfigure.width <= 1 + && configureEvent.xconfigure.height <= 1))) { #ifdef USE_GTK /* For GTK+ don't call x_net_wm_state for the scroll bar