X11: Fix EWMH state update for hidden windows

From upstream: 78e6a0063d
This commit is contained in:
Kovid Goyal 2019-02-03 20:09:18 +05:30
parent cb7eb48768
commit 22b756753a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

8
glfw/x11_window.c vendored
View File

@ -2253,16 +2253,20 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
_glfwInputWindowMonitor(window, monitor); _glfwInputWindowMonitor(window, monitor);
updateNormalHints(window, width, height); updateNormalHints(window, width, height);
updateWindowMode(window);
if (window->monitor) if (window->monitor)
{
if (!_glfwPlatformWindowVisible(window))
{ {
XMapRaised(_glfw.x11.display, window->x11.handle); XMapRaised(_glfw.x11.display, window->x11.handle);
if (waitForVisibilityNotify(window)) waitForVisibilityNotify(window);
}
updateWindowMode(window);
acquireMonitor(window); acquireMonitor(window);
} }
else else
{ {
updateWindowMode(window);
XMoveResizeWindow(_glfw.x11.display, window->x11.handle, XMoveResizeWindow(_glfw.x11.display, window->x11.handle,
xpos, ypos, width, height); xpos, ypos, width, height);
} }