Windows: Fix window_get_size_with_decorations returning an invalid size when restoring from minimize #112534
+8
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #79754.
In Windows (replicated in Windows 10 & 11), minimizing then restoring a window that has both a
sizeand amax_sizeset will cause the window to shrink to the smallest size window possible.This PR fixes it by storing the width and height from
GetWindowRect()and reading from that if the window is minimized. This is the exact same way we already solve the issue when reading fromGetClientRect()inwindow_get_size.Before
minimize_before.mp4
After
minimize_after.mp4
Minimum reproduction
min-rep-resize_2025-11-08_20-39-42.zip