From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#50534: 28.0.50; Toolbar shows despite tool-bar-mode being disabled on macOS Date: Tue, 14 Sep 2021 13:13:21 +0100 Message-ID: References: <43E37DDD-8314-4A12-8111-A7C48F625BD7@korins.ky> <16F124DC-AFCD-41D6-B039-CB1BD715FBFE@korins.ky> <34066D3F-0684-43B4-9460-44EC98806E28@korins.ky> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="loBhANmFyZQm1mMU" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8953"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50534@debbugs.gnu.org To: "Kirill A. Korinsky" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 14 14:16: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 1mQ7MZ-00028R-4s for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Sep 2021 14:16:35 +0200 Original-Received: from localhost ([::1]:59484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQ7MX-0003gG-Ty for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Sep 2021 08:16:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQ7K6-0000eK-VB for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2021 08:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36316) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQ7K6-0005qp-MQ for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2021 08:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQ7K6-0005Mq-If for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2021 08:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Sep 2021 12:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50534 X-GNU-PR-Package: emacs Original-Received: via spool by 50534-submit@debbugs.gnu.org id=B50534.163162161420584 (code B ref 50534); Tue, 14 Sep 2021 12:14:02 +0000 Original-Received: (at 50534) by debbugs.gnu.org; 14 Sep 2021 12:13:34 +0000 Original-Received: from localhost ([127.0.0.1]:47861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQ7Je-0005Lw-GZ for submit@debbugs.gnu.org; Tue, 14 Sep 2021 08:13:34 -0400 Original-Received: from outbound.soverin.net ([116.202.126.228]:57485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQ7Jc-0005LZ-6F for 50534@debbugs.gnu.org; Tue, 14 Sep 2021 08:13:33 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id EB6954F; Tue, 14 Sep 2021 12:13:25 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1631621605; bh=62YmhRKuNRqM2SBxzzsjwE3jLGFuJdbN3xLPzgA5Idc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gWbFc5qko3XkYYhHioPzGue3OYAMIyXKCiSNYkfymMIvfrHhBOTOBu9UpkyB+jPNY LNOfaaDgdlnJKnwE7sdx7jhDL9aSv1aH2FjW0XXKhx/y7ItZwkS6H4p72jY59N9kXr k8nze6D005qPTTuviSJViiMZiczoJMyepofJCoDR0Mo7N53vqdj+Wd1aqkyes1rvJp C+3iX2jCahao1SOvp+pjXCkYXiKYvq8/qhn2qQdeV1jngVgYbHw5SF0s+9cVCBGhlz 1gIN6UUlGZqNDeFdJIPrOQjnsCABcoKBzzj1cmVIdRH4QdVW3Uth/YxyHt5XN4kqL9 uUi9lE1IiCKoA== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94.2) (envelope-from ) id 1mQ7JR-001zE9-CU; Tue, 14 Sep 2021 13:13:21 +0100 Mail-Followup-To: Alan Third , "Kirill A. Korinsky" , 50534@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <34066D3F-0684-43B4-9460-44EC98806E28@korins.ky> 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:214302 Archived-At: --loBhANmFyZQm1mMU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Sep 14, 2021 at 01:26:44PM +0200, Kirill A. Korinsky wrote: > I have one bad news: it still exists but less often. > > I can reproduce it one time in 10 starts of my emacs. The *only* place that should modify FRAME_EXTERNAL_TOOL_BAR is ns_set_tool_bar_lines, which should be called *every time* the number of lines is changed. It would be nice to know what the value of FRAME_EXTERNAL_TOOL_BAR and tool-bar-lines are when the toolbar is wrongly visible, because I can't find a single location in the code that sets the visibility without first checking FRAME_EXTERNAL_TOOL_BAR, and it should *always* be set by ns_set_tool_bar_lines. *sigh* I've no idea. Attached is the nuclear option. If this doesn't work then FRAME_EXTERNAL_TOOL_BAR is wrong. -- Alan Third --loBhANmFyZQm1mMU Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-A-further-fix-for-toolbar-visibility-problems-on-mac.patch" >From 5a652de0e955185fafdad3b2aa886c0fdf48e679 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Tue, 14 Sep 2021 13:03:37 +0100 Subject: [PATCH] A further fix for toolbar visibility problems on macOS (bug#50534) * src/nsterm.m (ns_update_begin): Ensure the toolbar's visibility is set correctly. --- src/nsterm.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 33850544b0..14dc6573b8 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1034,16 +1034,14 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen) ns_update_auto_hide_menu_bar (); -#ifdef NS_IMPL_COCOA - if ([view isFullscreen] && [view fsIsNative]) + NSToolbar *toolbar = [[FRAME_NS_VIEW (f) window] toolbar]; + if (toolbar) { - // Fix reappearing tool bar in fullscreen for Mac OS X 10.7 + /* Ensure the toolbars visibility is set correctly. */ BOOL tbar_visible = FRAME_EXTERNAL_TOOL_BAR (f) ? YES : NO; - NSToolbar *toolbar = [[FRAME_NS_VIEW (f) window] toolbar]; if (! tbar_visible != ! [toolbar isVisible]) [toolbar setVisible: tbar_visible]; } -#endif ns_updating_frame = f; [view lockFocus]; -- 2.30.2 --loBhANmFyZQm1mMU--