Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the terminal snapping across DPI boundaries strangely. #2150

Merged
merged 1 commit into from
Jul 30, 2019

Conversation

zadjii-msft
Copy link
Member

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

…or the normal (non-tabs in titlebar) window?
case WM_DPICHANGED:
{
auto lprcNewScale = reinterpret_cast<RECT*>(lParam);
OnSize(RECT_WIDTH(lprcNewScale), RECT_HEIGHT(lprcNewScale));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should basewindow call this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fix is fine

@DHowett-MSFT DHowett-MSFT merged commit 2d3e271 into master Jul 30, 2019
@DHowett-MSFT DHowett-MSFT deleted the dev/migrie/b/snap-padding branch July 30, 2019 22:04
@zadjii-msft zadjii-msft restored the dev/migrie/b/snap-padding branch August 8, 2019 14:43
@zadjii-msft zadjii-msft deleted the dev/migrie/b/snap-padding branch August 8, 2019 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dragging into corner for 1/4 view will result tab to be smaller than maximum
3 participants