Win32: Remove double resize of full screen window

Related to #1085.
This commit is contained in:
Camilla Löwy
2017-11-16 11:03:05 +01:00
parent 8b81a03a5a
commit d630684654
2 changed files with 7 additions and 13 deletions
+6 -13
View File
@@ -1497,26 +1497,19 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
if (monitor)
{
GLFWvidmode mode;
DWORD style = GetWindowLongW(window->win32.handle, GWL_STYLE);
UINT flags = SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOCOPYBITS;
if (window->decorated)
{
DWORD style = GetWindowLongW(window->win32.handle, GWL_STYLE);
UINT flags = SWP_FRAMECHANGED | SWP_SHOWWINDOW |
SWP_NOACTIVATE | SWP_NOCOPYBITS |
SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE;
style &= ~WS_OVERLAPPEDWINDOW;
style |= getWindowStyle(window);
SetWindowLongW(window->win32.handle, GWL_STYLE, style);
flags |= SWP_FRAMECHANGED;
SetWindowPos(window->win32.handle, HWND_TOPMOST, 0, 0, 0, 0, flags);
}
_glfwPlatformGetVideoMode(monitor, &mode);
_glfwPlatformGetMonitorPos(monitor, &xpos, &ypos);
SetWindowPos(window->win32.handle, HWND_TOPMOST,
xpos, ypos, mode.width, mode.height,
flags);
acquireMonitor(window);
}
else