Skip to content

Resize DPI unaware windows more precisely#957

Merged
yuyoyuppe merged 3 commits intomicrosoft:masterfrom
yuyoyuppe:762_fix
Dec 17, 2019
Merged

Resize DPI unaware windows more precisely#957
yuyoyuppe merged 3 commits intomicrosoft:masterfrom
yuyoyuppe:762_fix

Conversation

@yuyoyuppe
Copy link
Contributor

Summary of the Pull Request

Restrict DPI unaware windows horizontally to the current display to avoid unwanted automatic resize by Windows. This could introduce a small horizontal gap for those windows due to clamped right_margin; increasing it even by 1px triggers the bug though.

PR Checklist

Validation Steps Performed

Tested various horizontal/vertical combinations of column/row/custom layout with a different scaling levels and dpi-(un)aware apps.

@yuyoyuppe yuyoyuppe requested review from bzoz and enricogior December 17, 2019 09:45
{
zoneRect.left = max(mi.rcMonitor.left, zoneRect.left);
zoneRect.right = min(mi.rcMonitor.right, zoneRect.right);
// Vertical window leaking ~seems~ not to trigger unwanted window resize, so we don't crop it yet
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you try to place one screen on top of the other while putting the taskbar on the edge of screen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that you've mentioned it, I've tried another combination which still triggers the bug even with this code uncommented: you need to have one screen on top of the other with a different scaling and both taskbars enclosing them. I'll investigate it now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@enricogior fixed

Copy link
Contributor

@enricogior enricogior left a comment

Choose a reason for hiding this comment

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

Great work!

@yuyoyuppe yuyoyuppe merged commit 48b8960 into microsoft:master Dec 17, 2019
@yuyoyuppe yuyoyuppe deleted the 762_fix branch December 17, 2019 12:37
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.

3 participants