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.
This commit is contained in:
Alvin Wong 2024-06-29 18:24:45 +08:00
parent 811ce36c60
commit c54477b7e6
1 changed files with 1 additions and 1 deletions

View File

@ -2008,7 +2008,7 @@ void DisplayServerWindows::window_set_mode(WindowMode p_mode, WindowID p_window)
}
if (p_mode == WINDOW_MODE_WINDOWED) {
ShowWindow(wd.hWnd, SW_RESTORE);
ShowWindow(wd.hWnd, SW_NORMAL);
wd.maximized = false;
wd.minimized = false;
}