diff --git a/README.md b/README.md index dba6a0a7..5ef35f17 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ guide in the GLFW documentation. - [Cocoa] Bugfix: Retrieving the name of some external displays caused segfault - [Cocoa] Bugfix: The 10.9 SDK defines `GLintptrARB` and `GLsizeiptrARB` differently from the Khronos `glext.h` + - [Cocoa] Bugfix: Creating hidden windows would steal application focus - [X11] Added setting of the `WM_CLASS` property to the initial window title - [X11] Bugfix: Removed joystick axis value negation left over from GLFW 2 - [X11] Bugfix: The position of hidden windows was ignored by Metacity diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 7bc85b93..48e4d703 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -830,9 +830,6 @@ static GLboolean initializeAppKit(void) // In case we are unbundled, make us a proper UI application [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; - // Make us the active application - [NSApp activateIgnoringOtherApps:YES]; - #if defined(_GLFW_USE_MENUBAR) // Menu bar setup must go between sharedApplication above and // finishLaunching below, in order to properly emulate the behavior @@ -1038,6 +1035,9 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window) void _glfwPlatformShowWindow(_GLFWwindow* window) { + // Make us the active application + [NSApp activateIgnoringOtherApps:YES]; + [window->ns.object makeKeyAndOrderFront:nil]; _glfwInputWindowVisibility(window, GL_TRUE); }