Răsfoiți Sursa

Cocoa: Fix console apps getting a dock icon

Regression introduced by @elmindreda in
8b118674643b199fc28d11dc22039ffe528970b3.

Adapted to 3.3-stable from 6de084000bbebec345f4e5845a92fb2f4f931c00.
Camilla Löwy 4 ani în urmă
părinte
comite
c6fa2c8cfb
1 a modificat fișierele cu 4 adăugiri și 1 ștergeri
  1. 4 1
      src/cocoa_init.m

+ 4 - 1
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];
 }