Add glfwShowWindow, glfwHideWindow

Add glfwShowWindow and glfwHideWindow functions to allow explicit
control over show/hide window.

Remove platform specific show window code from _glfwPlatformCreateWindow
but call glfwShowWindow from glfwCreateWindow to avoid breaking things
(for now).
This commit is contained in:
Riku Salminen
2012-08-21 21:01:57 +03:00
parent b77bdea734
commit 596132c3a1
6 changed files with 101 additions and 97 deletions
+19 -1
View File
@@ -906,7 +906,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
if (!createContext(window, wndconfig, fbconfig))
return GL_FALSE;
[window->NS.object makeKeyAndOrderFront:nil];
[window->NSGL.context setView:[window->NS.object contentView]];
if (wndconfig->mode == GLFW_FULLSCREEN)
@@ -1030,6 +1029,25 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window)
}
//========================================================================
// Show window
//========================================================================
void _glfwPlatformShowWindow(_GLFWwindow* window)
{
[window->NS.object makeKeyAndOrderFront:nil];
}
//========================================================================
// Hide window
//========================================================================
void _glfwPlatformHideWindow(_GLFWwindow* window)
{
[window->NS.object orderOut:nil];
}
//========================================================================
// Write back window parameters into GLFW window structure
//========================================================================