mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Fixed OS X enter/leave full screen triggers.
This commit is contained in:
parent
81bcefe86c
commit
e57da19d4a
|
@ -195,20 +195,23 @@ static NSRect convertRectToBacking(_GLFWwindow* window, NSRect contentRect)
|
|||
|
||||
- (void)windowDidDeminiaturize:(NSNotification *)notification
|
||||
{
|
||||
if (window->monitor)
|
||||
enterFullscreenMode(window);
|
||||
|
||||
_glfwInputWindowIconify(window, GL_FALSE);
|
||||
}
|
||||
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification
|
||||
{
|
||||
if (window->monitor)
|
||||
enterFullscreenMode(window);
|
||||
|
||||
_glfwInputWindowFocus(window, GL_TRUE);
|
||||
_glfwPlatformApplyCursorMode(window);
|
||||
}
|
||||
|
||||
- (void)windowDidResignKey:(NSNotification *)notification
|
||||
{
|
||||
if (window->monitor)
|
||||
leaveFullscreenMode(window);
|
||||
|
||||
_glfwInputWindowFocus(window, GL_FALSE);
|
||||
}
|
||||
|
||||
|
@ -1038,9 +1041,6 @@ void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
|
|||
|
||||
void _glfwPlatformIconifyWindow(_GLFWwindow* window)
|
||||
{
|
||||
if (window->monitor)
|
||||
leaveFullscreenMode(window);
|
||||
|
||||
[window->ns.object miniaturize:nil];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user