mirror of
https://github.com/glfw/glfw.git
synced 2025-10-03 13:20:58 +00:00
Moved WS_VISIBLE modifier to SetWindowLongPtr in _glfwPlatformSetWindowMonitor
This commit is contained in:
parent
e4c919a6df
commit
2c5a381675
@ -41,11 +41,6 @@ static getWindowStyle(const _GLFWwndconfig* wndconfig)
|
|||||||
{
|
{
|
||||||
DWORD style = WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
|
DWORD style = WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
|
||||||
|
|
||||||
if (wndconfig->visible)
|
|
||||||
{
|
|
||||||
style |= WS_VISIBLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wndconfig->decorated && wndconfig->monitor == NULL)
|
if (wndconfig->decorated && wndconfig->monitor == NULL)
|
||||||
{
|
{
|
||||||
style |= WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
|
style |= WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
|
||||||
@ -1214,13 +1209,14 @@ 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);
|
||||||
|
|
||||||
|
DWORD styleMod = (window->visible || monitor) ? WS_VISIBLE : 0;
|
||||||
|
|
||||||
SetWindowLongPtr(window->win32.handle,
|
SetWindowLongPtr(window->win32.handle,
|
||||||
GWL_STYLE, window->win32.dwStyle);
|
GWL_STYLE, window->win32.dwStyle | WS_VISIBLE);
|
||||||
SetWindowLongPtr(window->win32.handle,
|
SetWindowLongPtr(window->win32.handle,
|
||||||
GWL_EXSTYLE, window->win32.dwExStyle);
|
GWL_EXSTYLE, window->win32.dwExStyle);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user