mirror of
https://github.com/glfw/glfw
synced 2026-09-26 16:18:21 +03:00
Merge 58de77fc49 into 92dcf4ce74
This commit is contained in:
commit
5e2c357e88
2 changed files with 9 additions and 2 deletions
|
|
@ -540,6 +540,7 @@ struct _GLFWwindow
|
|||
GLFWbool focusOnShow;
|
||||
GLFWbool mousePassthrough;
|
||||
GLFWbool shouldClose;
|
||||
GLFWbool visible;
|
||||
void* userPointer;
|
||||
GLFWbool doublebuffer;
|
||||
GLFWvidmode videoMode;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ static GLFWbool waitForVisibilityNotify(_GLFWwindow* window)
|
|||
if (!waitForX11Event(&timeout))
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
window->visible = GLFW_TRUE;
|
||||
return GLFW_TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -1832,6 +1832,12 @@ static void processEvent(XEvent *event)
|
|||
return;
|
||||
}
|
||||
|
||||
case VisibilityNotify :
|
||||
{
|
||||
if (event->xvisibility.state == VisibilityFullyObscured) window->visible = GLFW_FALSE;
|
||||
else window->visible = GLFW_TRUE;
|
||||
}
|
||||
|
||||
case DestroyNotify:
|
||||
return;
|
||||
}
|
||||
|
|
@ -2581,7 +2587,7 @@ GLFWbool _glfwWindowVisibleX11(_GLFWwindow* window)
|
|||
{
|
||||
XWindowAttributes wa;
|
||||
XGetWindowAttributes(_glfw.x11.display, window->x11.handle, &wa);
|
||||
return wa.map_state == IsViewable;
|
||||
return wa.map_state == IsViewable && window->visible == GLFW_TRUE;
|
||||
}
|
||||
|
||||
GLFWbool _glfwWindowMaximizedX11(_GLFWwindow* window)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue