WS_VISIBLE only set if window needs to be visible.

This commit is contained in:
Doug Binks 2014-06-24 20:17:09 +02:00
parent 53df5422b8
commit e4c919a6df

View File

@ -39,7 +39,12 @@
// //
static getWindowStyle(const _GLFWwndconfig* wndconfig) 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) if (wndconfig->decorated && wndconfig->monitor == NULL)
{ {
@ -1209,6 +1214,7 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
wndconfig.resizable = window->resizable; wndconfig.resizable = window->resizable;
wndconfig.decorated = window->decorated; wndconfig.decorated = window->decorated;
wndconfig.monitor = monitor; wndconfig.monitor = monitor;
wndconfig.visible = window->visible || monitor;
window->win32.dwStyle = getWindowStyle(&wndconfig); window->win32.dwStyle = getWindowStyle(&wndconfig);
window->win32.dwExStyle = getWindowExStyle(&wndconfig); window->win32.dwExStyle = getWindowExStyle(&wndconfig);