This commit is contained in:
Chi-kwan Chan 2015-05-18 20:58:46 +00:00
commit bb1f41edb7

View File

@ -1060,12 +1060,16 @@ void _glfwPlatformShowWindow(_GLFWwindow* window)
// should probably not be done every time any window is shown // should probably not be done every time any window is shown
[NSApp activateIgnoringOtherApps:YES]; [NSApp activateIgnoringOtherApps:YES];
_GLFWwindow* previous = _glfwPlatformGetCurrentContext();
[window->ns.object makeKeyAndOrderFront:nil]; [window->ns.object makeKeyAndOrderFront:nil];
_glfwPlatformMakeContextCurrent(previous);
} }
void _glfwPlatformUnhideWindow(_GLFWwindow* window) void _glfwPlatformUnhideWindow(_GLFWwindow* window)
{ {
_GLFWwindow* previous = _glfwPlatformGetCurrentContext();
[window->ns.object orderFront:nil]; [window->ns.object orderFront:nil];
_glfwPlatformMakeContextCurrent(previous);
} }
void _glfwPlatformHideWindow(_GLFWwindow* window) void _glfwPlatformHideWindow(_GLFWwindow* window)