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: Sun, 12 Sep 2021 12:48:28 +0100 [thread overview]
Message-ID: <YT3pDHIk01mMP759@idiocy.org> (raw)
In-Reply-To: <77D861E8-5987-4434-9B87-B2D021D9E078@korins.ky>
[-- Attachment #1: Type: text/plain, Size: 2505 bytes --]
On Sun, Sep 12, 2021 at 02:29:19AM +0200, Kirill A. Korinsky via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
> Good day!
>
> I've described this bug here:
> https://github.com/hlissner/doom-emacs/issues/5469
>
> During investigation I've discovered the exact commit which brokes
> toolbar on this scenario.
>
> Let me share git bisect log:
> git bisect start
> # good: [cfcf42ff879f766ffe5812fb0cd12f35803c1bfb] Ensure that gud commands for non-GDB debuggers are handled by repeat-mode
> git bisect good cfcf42ff879f766ffe5812fb0cd12f35803c1bfb
> # bad: [192a384408cc846d8e66e91a67cd9ad4e7f0be24] Revert usage of format-prompt in python.el
> git bisect bad 192a384408cc846d8e66e91a67cd9ad4e7f0be24
> # bad: [beb54dc1b2b00cb4541b82acf6ead8a8075c3011] Improve documentation of 'file-preserve-symlinks-on-save'
> git bisect bad beb54dc1b2b00cb4541b82acf6ead8a8075c3011
> # bad: [c56e395edf5babdbcc65fa7bdb9fb462c674f156] Let image-dired-mouse-toggle-mark act on active region
> git bisect bad c56e395edf5babdbcc65fa7bdb9fb462c674f156
> # bad: [0ec67a295632f3c4ac92e0b6a0070f67dedac4eb] ; so-long-tests.el: Suppress expected warnings
> git bisect bad 0ec67a295632f3c4ac92e0b6a0070f67dedac4eb
> # bad: [12c5ca4d825496b3c7304b75ab82a6fabdc2023d] Fix some macOS problems
> git bisect bad 12c5ca4d825496b3c7304b75ab82a6fabdc2023d
> # good: [0bd1346318fe9ef4eba91905172d30a030d7da18] Fix issue with mml-preview from outside Gnus
> git bisect good 0bd1346318fe9ef4eba91905172d30a030d7da18
> # good: [55a9c17cef78b1fd3da42bcc2ab55d4acbaa24eb] Change Tramp version to "2.5.2-pre"
> git bisect good 55a9c17cef78b1fd3da42bcc2ab55d4acbaa24eb
> # good: [a4d2c88cdee90a3e4863a62c4ff69896d0c1a347] Simplify macOS drawing code
> git bisect good a4d2c88cdee90a3e4863a62c4ff69896d0c1a347
> # bad: [1ba02d85a964e1b2c6a9735cd3decdc524e06dc1] Fix macOS live resize drawing
> git bisect bad 1ba02d85a964e1b2c6a9735cd3decdc524e06dc1
> # bad: [960f3fc589d8d021e1ed1a505e660929e4c13d0a] Change NS port resize detection
> git bisect bad 960f3fc589d8d021e1ed1a505e660929e4c13d0a
> # good: [1535c81f77153dd61426246be2e8afd33fa6909a] Tidy up NS port OS window handling
> git bisect good 1535c81f77153dd61426246be2e8afd33fa6909a
> # first bad commit: [960f3fc589d8d021e1ed1a505e660929e4c13d0a] Change NS port resize detection
I can't for the life of my see why that commit should break it, but
can you please try the attached patch and see if it fixes the problem?
I can't replicate it here.
--
Alan Third
[-- Attachment #2: 0001-Fix-incorrectly-appearing-toolbar-on-NS-bug-50534.patch --]
[-- Type: text/x-diff, Size: 2496 bytes --]
From 527ba13636c83f826d385de628d5e56556cfa021 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Sun, 12 Sep 2021 12:42:11 +0100
Subject: [PATCH] Fix incorrectly appearing toolbar on NS (bug#50534)
* src/nsterm.h (FRAME_TOOLBAR_P): Work out whether the frame should
have a toolbar or not.
* src/nsterm.m (ns_update_begin):
([EmacsView windowDidEnterFullScreen]):
([EmacsView windowDidExitFullScreen]): Use new FRAME_TOOLBAR_P instead
of the apparently unreliable FRAME_EXTERNAL_TOOL_BAR.
---
src/nsterm.h | 3 +++
src/nsterm.m | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/nsterm.h b/src/nsterm.h
index 6d4ea77121..8fb9c0fda1 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -1074,6 +1074,9 @@ #define FIRST_CHAR_POSITION(f) \
(! (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) ? 0 \
: FRAME_SCROLL_BAR_COLS (f))
+#define FRAME_TOOLBAR_P(f) (FRAME_EXTERNAL_TOOL_BAR (f) \
+ && FRAME_TOOL_BAR_LINES (f) > 0)
+
extern struct ns_display_info *ns_term_init (Lisp_Object display_name);
extern void ns_term_shutdown (int sig);
diff --git a/src/nsterm.m b/src/nsterm.m
index 8d88f7bd3d..24a2383848 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1025,7 +1025,7 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
if ([view isFullscreen] && [view fsIsNative])
{
// Fix reappearing tool bar in fullscreen for Mac OS X 10.7
- BOOL tbar_visible = FRAME_EXTERNAL_TOOL_BAR (f) ? YES : NO;
+ BOOL tbar_visible = FRAME_TOOLBAR_P (f);
NSToolbar *toolbar = [[FRAME_NS_VIEW (f) window] toolbar];
if (! tbar_visible != ! [toolbar isVisible])
[toolbar setVisible: tbar_visible];
@@ -7403,7 +7403,7 @@ - (void)windowDidEnterFullScreen /* provided for direct calls */
}
else
{
- BOOL tbar_visible = FRAME_EXTERNAL_TOOL_BAR (emacsframe) ? YES : NO;
+ BOOL tbar_visible = FRAME_TOOLBAR_P (emacsframe);
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 \
&& MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
unsigned val = (unsigned)[NSApp presentationOptions];
@@ -7462,7 +7462,7 @@ - (void)windowDidExitFullScreen /* provided for direct calls */
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
[self updateCollectionBehavior];
#endif
- if (FRAME_EXTERNAL_TOOL_BAR (emacsframe))
+ if (FRAME_TOOLBAR_P (emacsframe))
{
[[[self window] toolbar] setVisible:YES];
update_frame_tool_bar (emacsframe);
--
2.30.2
next prev parent reply other threads:[~2021-09-12 11:48 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 ` Alan Third [this message]
2021-09-12 12:54 ` 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
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YT3pDHIk01mMP759@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.