mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 13:03:52 +00:00
Disallowed hiding of fullscreen windows.
This commit is contained in:
parent
d214bfdfde
commit
023b816bcc
20
src/window.c
20
src/window.c
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user