Fix the terminal snapping across DPI boundaries strangely. #2150
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.
Summary of the Pull Request
When we snap across a DPI boundary, we'll get the DPI changed message after the resize message. So when we try to calculate the new terminal position, we'll use the old DPI to calculate the size. When snapping to a lower DPI, this means the terminal will be smaller, with "padding" all around the actual app.
Instead, when we get a new DPI, force us to update out UI layout for the new DPI.
PR Checklist
Validation Steps Performed
Snapped the terminal a bunch back and forth on my monitors.
Checked this works fine for
showTabsInTitlebar: false
.Tried snapping into corners from high to low back to high DPI