emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1e83d04 2/2: Fix incorrectly appearing toolbar on NS (bug#50534)


From: Alan Third
Subject: master 1e83d04 2/2: Fix incorrectly appearing toolbar on NS (bug#50534)
Date: Tue, 14 Sep 2021 05:12:18 -0400 (EDT)

branch: master
commit 1e83d04214f27a79a4d4841772da946e24cbf21d
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>

    Fix incorrectly appearing toolbar on NS (bug#50534)
    
    * src/nsmenu.m (update_frame_tool_bar): Ensure both sides of the test
    are booleans.
    * src/nsterm.m ([EmacsWindow createToolbar:]): Make the toolbar
    non-visible initially, in case things get out of sync.  Remove call to
    update_frame_tool_bar: the window isn't yet associated with the view,
    so it will return immediately.
---
 src/nsmenu.m | 2 +-
 src/nsterm.m | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/nsmenu.m b/src/nsmenu.m
index 3493e4e..f0c5bb2 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1094,7 +1094,7 @@ update_frame_tool_bar (struct frame *f)
 #undef TOOLPROP
     }
 
-  if ([toolbar isVisible] != FRAME_EXTERNAL_TOOL_BAR (f))
+  if (![toolbar isVisible] != !FRAME_EXTERNAL_TOOL_BAR (f))
     {
       f->output_data.ns->in_animation = 1;
       [toolbar setVisible: FRAME_EXTERNAL_TOOL_BAR (f)];
diff --git a/src/nsterm.m b/src/nsterm.m
index 8d88f7b..7c90bbd 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8323,10 +8323,9 @@ not_in_argv (NSString *arg)
   EmacsToolbar *toolbar = [[EmacsToolbar alloc]
                             initForView:view
                             withIdentifier:[NSString 
stringWithLispString:f->name]];
+  [toolbar setVisible:NO];
   [self setToolbar:toolbar];
 
-  update_frame_tool_bar (f);
-
 #ifdef NS_IMPL_COCOA
   {
     NSButton *toggleButton;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]