[PR #8066] Prevent resizing terminal to a lower-than-minimum width #27083

Closed
opened 2026-01-31 09:19:53 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/8066

State: closed
Merged: Yes


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

**Original Pull Request:** https://github.com/microsoft/terminal/pull/8066 **State:** closed **Merged:** Yes --- 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
claunia added the pull-request label 2026-01-31 09:19:53 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27083