mirror of
https://github.com/glfw/glfw.git
synced 2025-01-19 06:25:54 +00:00
Removed racy checks of cached iconification state.
This commit is contained in:
parent
41d998eb3c
commit
7dba90b7ca
16
src/window.c
16
src/window.c
@ -84,9 +84,6 @@ void _glfwInputWindowSize(_GLFWwindow* window, int width, int height)
|
|||||||
|
|
||||||
void _glfwInputWindowIconify(_GLFWwindow* window, int iconified)
|
void _glfwInputWindowIconify(_GLFWwindow* window, int iconified)
|
||||||
{
|
{
|
||||||
if (window->iconified == iconified)
|
|
||||||
return;
|
|
||||||
|
|
||||||
window->iconified = iconified;
|
window->iconified = iconified;
|
||||||
|
|
||||||
if (window->callbacks.iconify)
|
if (window->callbacks.iconify)
|
||||||
@ -499,9 +496,6 @@ GLFWAPI void glfwSetWindowSize(GLFWwindow* handle, int width, int height)
|
|||||||
|
|
||||||
_GLFW_REQUIRE_INIT();
|
_GLFW_REQUIRE_INIT();
|
||||||
|
|
||||||
if (window->iconified)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (window->monitor)
|
if (window->monitor)
|
||||||
{
|
{
|
||||||
window->videoMode.width = width;
|
window->videoMode.width = width;
|
||||||
@ -546,24 +540,14 @@ GLFWAPI void glfwGetWindowFrameSize(GLFWwindow* handle,
|
|||||||
GLFWAPI void glfwIconifyWindow(GLFWwindow* handle)
|
GLFWAPI void glfwIconifyWindow(GLFWwindow* handle)
|
||||||
{
|
{
|
||||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||||
|
|
||||||
_GLFW_REQUIRE_INIT();
|
_GLFW_REQUIRE_INIT();
|
||||||
|
|
||||||
if (window->iconified)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_glfwPlatformIconifyWindow(window);
|
_glfwPlatformIconifyWindow(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLFWAPI void glfwRestoreWindow(GLFWwindow* handle)
|
GLFWAPI void glfwRestoreWindow(GLFWwindow* handle)
|
||||||
{
|
{
|
||||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||||
|
|
||||||
_GLFW_REQUIRE_INIT();
|
_GLFW_REQUIRE_INIT();
|
||||||
|
|
||||||
if (!window->iconified)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_glfwPlatformRestoreWindow(window);
|
_glfwPlatformRestoreWindow(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user