From 24b93139581836ea8ec3f88cda0edbb3baba8812 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 29 Sep 2016 10:18:15 -0700 Subject: [PATCH 1/2] Disable Show Tab Bar menu item on macOS Sierrra --- atom/browser/mac/atom_application_delegate.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/atom/browser/mac/atom_application_delegate.mm b/atom/browser/mac/atom_application_delegate.mm index 4c6a938fba59..74f45e2d2669 100644 --- a/atom/browser/mac/atom_application_delegate.mm +++ b/atom/browser/mac/atom_application_delegate.mm @@ -21,6 +21,11 @@ // Don't add the "Enter Full Screen" menu item automatically. [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"]; + // Don't add the "Show Tab Bar" menu item. + if ([NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)]) { + NSWindow.allowsAutomaticWindowTabbing = NO; + } + atom::Browser::Get()->WillFinishLaunching(); } From 770a3509cfcd62c958dc2b70bd497585f55b565c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 29 Sep 2016 10:36:38 -0700 Subject: [PATCH 2/2] Add forward declaration of NSWindow.allowsAutomaticWindowTabbing --- atom/browser/mac/atom_application_delegate.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/atom/browser/mac/atom_application_delegate.mm b/atom/browser/mac/atom_application_delegate.mm index 74f45e2d2669..9e245f99078d 100644 --- a/atom/browser/mac/atom_application_delegate.mm +++ b/atom/browser/mac/atom_application_delegate.mm @@ -10,6 +10,10 @@ #include "base/strings/sys_string_conversions.h" #include "base/values.h" +@interface NSWindow (SierraSDK) +@property(class) BOOL allowsAutomaticWindowTabbing; +@end + @implementation AtomApplicationDelegate - (void)setApplicationDockMenu:(atom::AtomMenuModel*)model { @@ -22,9 +26,8 @@ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"]; // Don't add the "Show Tab Bar" menu item. - if ([NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)]) { + if ([NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)]) NSWindow.allowsAutomaticWindowTabbing = NO; - } atom::Browser::Get()->WillFinishLaunching(); }