1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Moved application activation to window showing.

Fixes #93.
This commit is contained in:
Camilla Berglund 2013-11-07 18:07:46 +01:00
parent ec5cb9c6f7
commit a83d257ac6
2 changed files with 4 additions and 3 deletions

View File

@ -59,6 +59,7 @@ guide in the GLFW documentation.
- [Cocoa] Bugfix: Retrieving the name of some external displays caused segfault - [Cocoa] Bugfix: Retrieving the name of some external displays caused segfault
- [Cocoa] Bugfix: The 10.9 SDK defines `GLintptrARB` and `GLsizeiptrARB` - [Cocoa] Bugfix: The 10.9 SDK defines `GLintptrARB` and `GLsizeiptrARB`
differently from the Khronos `glext.h` 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] 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: Removed joystick axis value negation left over from GLFW 2
- [X11] Bugfix: The position of hidden windows was ignored by Metacity - [X11] Bugfix: The position of hidden windows was ignored by Metacity

View File

@ -830,9 +830,6 @@ static GLboolean initializeAppKit(void)
// In case we are unbundled, make us a proper UI application // In case we are unbundled, make us a proper UI application
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
// Make us the active application
[NSApp activateIgnoringOtherApps:YES];
#if defined(_GLFW_USE_MENUBAR) #if defined(_GLFW_USE_MENUBAR)
// Menu bar setup must go between sharedApplication above and // Menu bar setup must go between sharedApplication above and
// finishLaunching below, in order to properly emulate the behavior // finishLaunching below, in order to properly emulate the behavior
@ -1038,6 +1035,9 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window)
void _glfwPlatformShowWindow(_GLFWwindow* window) void _glfwPlatformShowWindow(_GLFWwindow* window)
{ {
// Make us the active application
[NSApp activateIgnoringOtherApps:YES];
[window->ns.object makeKeyAndOrderFront:nil]; [window->ns.object makeKeyAndOrderFront:nil];
_glfwInputWindowVisibility(window, GL_TRUE); _glfwInputWindowVisibility(window, GL_TRUE);
} }