Fix the terminal snapping across DPI boundaries strangely.#2150
Merged
DHowett-MSFT merged 1 commit intomasterfrom Jul 30, 2019
Merged
Fix the terminal snapping across DPI boundaries strangely.#2150DHowett-MSFT merged 1 commit intomasterfrom
DHowett-MSFT merged 1 commit intomasterfrom
Conversation
…or the normal (non-tabs in titlebar) window?
DHowett-MSFT
approved these changes
Jul 30, 2019
| case WM_DPICHANGED: | ||
| { | ||
| auto lprcNewScale = reinterpret_cast<RECT*>(lParam); | ||
| OnSize(RECT_WIDTH(lprcNewScale), RECT_HEIGHT(lprcNewScale)); |
Contributor
There was a problem hiding this comment.
should basewindow call this?
Member
Author
There was a problem hiding this comment.
@DHowett-MSFT I honestly don't know. IslandWindow seems fine right now as it is. Do you want this for 0.3? If so, I won't have time to spin builds to verify before EOD. I'm fine making a follow up to investigate doing this. Thoughts?
miniksa
approved these changes
Jul 30, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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