Skip to content

Commit

Permalink
Windows: Restore to windowed mode using SW_NORMAL
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alvinhochun committed Jun 29, 2024
1 parent 811ce36 commit c54477b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/windows/display_server_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c54477b

Please sign in to comment.