1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00

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.
This commit is contained in:
Alan Third 2021-09-13 20:09:22 +01:00
parent 443d37ff21
commit 1e83d04214
2 changed files with 2 additions and 3 deletions

View File

@ -1094,7 +1094,7 @@ - (void)menu:(NSMenu *)menu willHighlightItem:(NSMenuItem *)item
#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)];

View File

@ -8323,10 +8323,9 @@ - (void)createToolbar: (struct frame *)f
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;