Fixed OS X full screen window placement.

master
Camilla Berglund ago%!(EXTRA string=11 years)
parent 34bf1b13e9
commit 70c349f36b
  1. 16
      src/cocoa_window.m

@ -69,9 +69,18 @@ static void updateModeCursor(_GLFWwindow* window)
// 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
@ -1023,7 +1032,8 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
if (wndconfig->monitor)
{
_glfwPlatformShowWindow(window);
enterFullscreenMode(window);
if (!enterFullscreenMode(window))
return GL_FALSE;
}
return GL_TRUE;

Loading…
Cancel
Save