From d09b874244c8ef7385aff136acdaae6aae67ea7e Mon Sep 17 00:00:00 2001 From: Corbin Dunn Date: Thu, 4 Mar 2021 21:53:27 +0530 Subject: [PATCH] =?UTF-8?q?macOS/Ghost:=20Opt=20out=20of=20AppKit=E2=80=99?= =?UTF-8?q?s=20automatic=20window=20tabbing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since Blender is single-tabbed, this will prevent extraneous tab-related options from appearing in "Window" menu in case AppKit's internals change. Reviewed By: #platform_macos, sebbas, ankitm Differential Revision: https://developer.blender.org/D10606 --- intern/ghost/intern/GHOST_SystemCocoa.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 3b20c95c954..4a23b30e078 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -646,6 +646,11 @@ GHOST_TSuccess GHOST_SystemCocoa::init() [NSApp setDelegate:appDelegate]; } + // AppKit provides automatic window tabbing. Blender is a single-tabbed application without a + // macOS tab bar, and should explicitly opt-out of this. This is also controlled by the macOS + // user default #NSWindowTabbingEnabled. + NSWindow.allowsAutomaticWindowTabbing = NO; + [NSApp finishLaunching]; [pool drain];