1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Fixed OS X full screen window placement.

This commit is contained in:
Camilla Berglund 2014-11-04 20:00:05 +01:00
parent 34bf1b13e9
commit 70c349f36b

View File

@ -69,9 +69,18 @@ static void updateModeCursor(_GLFWwindow* window)
// Enter fullscreen mode // Enter fullscreen mode
// //
static void enterFullscreenMode(_GLFWwindow* window) static GLboolean enterFullscreenMode(_GLFWwindow* window)
{ {
_glfwSetVideoMode(window->monitor, &window->videoMode); GLboolean status;
status = _glfwSetVideoMode(window->monitor, &window->videoMode);
// NOTE: The window is resized despite mode setting failure to make
// glfwSetWindowSize more robust
[window->ns.object setFrame:[window->monitor->ns.screen frame]
display:YES];
return status;
} }
// Leave fullscreen mode // Leave fullscreen mode
@ -1023,7 +1032,8 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
if (wndconfig->monitor) if (wndconfig->monitor)
{ {
_glfwPlatformShowWindow(window); _glfwPlatformShowWindow(window);
enterFullscreenMode(window); if (!enterFullscreenMode(window))
return GL_FALSE;
} }
return GL_TRUE; return GL_TRUE;