diff --git a/src/win32_window.c b/src/win32_window.c index c013e409c..232877c1e 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -39,7 +39,12 @@ // static getWindowStyle(const _GLFWwndconfig* wndconfig) { - DWORD style = WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_VISIBLE; + DWORD style = WS_CLIPSIBLINGS | WS_CLIPCHILDREN; + + if (wndconfig->visible) + { + style |= WS_VISIBLE; + } if (wndconfig->decorated && wndconfig->monitor == NULL) { @@ -1209,6 +1214,7 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window, wndconfig.resizable = window->resizable; wndconfig.decorated = window->decorated; wndconfig.monitor = monitor; + wndconfig.visible = window->visible || monitor; window->win32.dwStyle = getWindowStyle(&wndconfig); window->win32.dwExStyle = getWindowExStyle(&wndconfig);