From c6fa2c8cfb9d69afa5d9c0117c3119ae5a33e061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 10 Feb 2021 17:23:43 +0100 Subject: [PATCH] Cocoa: Fix console apps getting a dock icon Regression introduced by @elmindreda in 8b118674643b199fc28d11dc22039ffe528970b3. Adapted to 3.3-stable from 6de084000bbebec345f4e5845a92fb2f4f931c00. --- src/cocoa_init.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cocoa_init.m b/src/cocoa_init.m index 0eb86f57..209639e2 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -446,8 +446,11 @@ static GLFWbool initializeTIS(void) { _glfw.ns.finishedLaunching = GLFW_TRUE; _glfwPlatformPostEmptyEvent(); + // In case we are unbundled, make us a proper UI application - [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; + if (_glfw.hints.init.ns.menubar) + [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; + [NSApp stop:nil]; }