-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent resizing terminal to a lower-than-minimum width (#8066)
Until now, we relied on WM_SIZING to ensure that the island is not downsized below minimal allowed dimensions. However, on some occasions WM_WINDOWPOSCHANGED, e.g. when anchoring a window to the top/bottom of the screen. This message will use dimensions obtained from WM_GETMINMAXINFO. Until now we didn't override this value, falling back to the defaults. As a result we got an inconsistent behavior (at least when attaching the anchor). I added logic very similar to the one we use in IslandWindow::_OnSizing to the MINMAXINFO handler: snap the client area, add non client exclusive are, consider DPI along the computation. ## Validation Steps Performed * Manual testing of minimizing, maximizing, resizing, attaching different anchors, etc. Closes #8026
- Loading branch information
Showing
5 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2830,3 +2830,5 @@ AAAAABBBBBBCCC | |
AAAAA | ||
BBBBBCCC | ||
abcd | ||
LPMINMAXINFO | ||
MINMAXINFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters