Skip to content

Commit c54477b

Browse files
committed
Windows: Restore to windowed mode using SW_NORMAL
If window was maximized before minimizing, restoring the window afterwards using SW_RESTORE seems to cause the window to forget its original size and position before being maximized, causing the window to fill the screen instead.
1 parent 811ce36 commit c54477b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform/windows/display_server_windows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@ void DisplayServerWindows::window_set_mode(WindowMode p_mode, WindowID p_window)
20082008
}
20092009

20102010
if (p_mode == WINDOW_MODE_WINDOWED) {
2011-
ShowWindow(wd.hWnd, SW_RESTORE);
2011+
ShowWindow(wd.hWnd, SW_NORMAL);
20122012
wd.maximized = false;
20132013
wd.minimized = false;
20142014
}

0 commit comments

Comments
 (0)