From: Alan Third <alan@idiocy.org>
To: "Kirill A. Korinsky" <kirill@korins.ky>
Cc: 50534@debbugs.gnu.org
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 [thread overview]
Message-ID: <YUCR4ZPVW5ZFXvjy@idiocy.org> (raw)
In-Reply-To: <34066D3F-0684-43B4-9460-44EC98806E28@korins.ky>
[-- Attachment #1: Type: text/plain, Size: 776 bytes --]
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
[-- Attachment #2: 0001-A-further-fix-for-toolbar-visibility-problems-on-mac.patch --]
[-- Type: text/x-diff, Size: 1222 bytes --]
From 5a652de0e955185fafdad3b2aa886c0fdf48e679 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
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
next prev parent reply other threads:[~2021-09-14 12:13 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-12 0:29 bug#50534: 28.0.50; Toolbar shows despite tool-bar-mode being disabled on macOS Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <handler.50534.B.16314065846903.ack@debbugs.gnu.org>
2021-09-12 9:25 ` bug#50534: Acknowledgement (28.0.50; Toolbar shows despite tool-bar-mode being disabled on macOS) Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-12 11:48 ` bug#50534: 28.0.50; Toolbar shows despite tool-bar-mode being disabled on macOS Alan Third
2021-09-12 12:54 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-12 15:33 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-12 15:44 ` Alan Third
2021-09-12 16:40 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-12 19:43 ` Alan Third
2021-09-12 19:52 ` Alan Third
2021-09-12 20:14 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-12 20:35 ` Alan Third
2021-09-12 21:02 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-13 18:44 ` Alan Third
2021-09-13 18:52 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-13 18:54 ` Alan Third
2021-09-13 18:57 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-13 19:11 ` Alan Third
2021-09-13 20:42 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-13 22:21 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-13 23:25 ` Alan Third
2021-09-14 0:05 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-14 9:21 ` Alan Third
2021-09-14 11:26 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-14 12:13 ` Alan Third [this message]
2021-09-14 12:54 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-14 14:17 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-14 14:35 ` Alan Third
2021-09-14 14:43 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-17 17:26 ` Alan Third
2021-09-26 10:56 ` Alan Third
2021-09-26 16:23 ` Mattias Engdegård
2021-09-27 10:10 ` Alan Third
2021-09-28 19:00 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-28 19:14 ` Alan Third
2021-09-29 10:53 ` Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-14 16:07 ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YUCR4ZPVW5ZFXvjy@idiocy.org \
--to=alan@idiocy.org \
--cc=50534@debbugs.gnu.org \
--cc=kirill@korins.ky \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).