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
+34
View File
@@ -318,6 +318,8 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height,
return GL_FALSE;
}
glfwShowWindow(window, 1); // TODO: consider if this is necessary!
// Cache the actual (as opposed to requested) window parameters
_glfwPlatformRefreshWindowParams(window);
@@ -623,6 +625,38 @@ GLFWAPI void glfwIconifyWindow(GLFWwindow handle)
}
//========================================================================
// Window show
//========================================================================
GLFWAPI void glfwShowWindow(GLFWwindow window)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
return;
}
_glfwPlatformShowWindow((_GLFWwindow*)window);
}
//========================================================================
// Window hide
//========================================================================
GLFWAPI void glfwHideWindow(GLFWwindow window)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
return;
}
_glfwPlatformHideWindow((_GLFWwindow*)window);
}
//========================================================================
// Window un-iconification
//========================================================================