Disallowed hiding of fullscreen windows.

This commit is contained in:
Camilla Berglund 2012-09-11 23:51:45 +02:00
parent d214bfdfde
commit 023b816bcc

View File

@ -366,7 +366,7 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height,
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);
_glfwPlatformSwapBuffers(window); _glfwPlatformSwapBuffers(window);
if (wndconfig.visible) if (wndconfig.visible || mode == GLFW_FULLSCREEN)
glfwShowWindow(window); glfwShowWindow(window);
return window; return window;
@ -649,15 +649,20 @@ GLFWAPI void glfwIconifyWindow(GLFWwindow handle)
// Window show // Window show
//======================================================================== //========================================================================
GLFWAPI void glfwShowWindow(GLFWwindow window) GLFWAPI void glfwShowWindow(GLFWwindow handle)
{ {
_GLFWwindow* window = (_GLFWwindow*) handle;
if (!_glfwInitialized) if (!_glfwInitialized)
{ {
_glfwSetError(GLFW_NOT_INITIALIZED, NULL); _glfwSetError(GLFW_NOT_INITIALIZED, NULL);
return; return;
} }
_glfwPlatformShowWindow((_GLFWwindow*)window); if (window->mode == GLFW_FULLSCREEN)
return;
_glfwPlatformShowWindow(window);
} }
@ -665,15 +670,20 @@ GLFWAPI void glfwShowWindow(GLFWwindow window)
// Window hide // Window hide
//======================================================================== //========================================================================
GLFWAPI void glfwHideWindow(GLFWwindow window) GLFWAPI void glfwHideWindow(GLFWwindow handle)
{ {
_GLFWwindow* window = (_GLFWwindow*) handle;
if (!_glfwInitialized) if (!_glfwInitialized)
{ {
_glfwSetError(GLFW_NOT_INITIALIZED, NULL); _glfwSetError(GLFW_NOT_INITIALIZED, NULL);
return; return;
} }
_glfwPlatformHideWindow((_GLFWwindow*)window); if (window->mode == GLFW_FULLSCREEN)
return;
_glfwPlatformHideWindow(window);
} }