Resize DPI unaware windows more precisely#957
Merged
yuyoyuppe merged 3 commits intomicrosoft:masterfrom Dec 17, 2019
Merged
Conversation
bzoz
approved these changes
Dec 17, 2019
enricogior
reviewed
Dec 17, 2019
src/modules/fancyzones/lib/Zone.cpp
Outdated
| { | ||
| 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 |
Contributor
There was a problem hiding this comment.
Did you try to place one screen on top of the other while putting the taskbar on the edge of screen?
Contributor
Author
There was a problem hiding this comment.
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.
…display to avoid unwanted resize
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
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.