mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
X11: Fix EWMH state update for hidden windows
The EWMH window state code assumed the window was mapped. Fixes #1358.
This commit is contained in:
+9
-4
@@ -2410,16 +2410,21 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
|
||||
|
||||
_glfwInputWindowMonitor(window, monitor);
|
||||
updateNormalHints(window, width, height);
|
||||
updateWindowMode(window);
|
||||
|
||||
if (window->monitor)
|
||||
{
|
||||
XMapRaised(_glfw.x11.display, window->x11.handle);
|
||||
if (waitForVisibilityNotify(window))
|
||||
acquireMonitor(window);
|
||||
if (!_glfwPlatformWindowVisible(window))
|
||||
{
|
||||
XMapRaised(_glfw.x11.display, window->x11.handle);
|
||||
waitForVisibilityNotify(window);
|
||||
}
|
||||
|
||||
updateWindowMode(window);
|
||||
acquireMonitor(window);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateWindowMode(window);
|
||||
XMoveResizeWindow(_glfw.x11.display, window->x11.handle,
|
||||
xpos, ypos, width, height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user