Added hack for full screen focus on OS X.

This commit is contained in:
Camilla Berglund
2013-10-17 19:59:09 +02:00
parent dbdf01d4a0
commit d78510457c
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -65,6 +65,11 @@ static void enterFullscreenMode(_GLFWwindow* window)
[window->ns.view enterFullScreenMode:window->monitor->ns.screen
withOptions:options];
// HACK: Synthesize focus event as window does not become key when the view
// is made full screen
// TODO: Remove this when moving to a full screen window
_glfwInputWindowFocus(window, GL_TRUE);
}
// Leave fullscreen mode
@@ -74,6 +79,11 @@ static void leaveFullscreenMode(_GLFWwindow* window)
if (![window->ns.view isInFullScreenMode])
return;
// HACK: Synthesize focus event as window does not become key when the view
// is made full screen
// TODO: Remove this when moving to a full screen window
_glfwInputWindowFocus(window, GL_FALSE);
_glfwRestoreVideoMode(window->monitor);
// Exit full screen after the video restore to avoid a nasty display