prevent incorrect shifting of window when dragging onto monitor with different DPI #4119
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.
changelog
module if knowledge of this change could be valuable to usersUpdated documentation to reflect any user-facing changes, including notes of platform-specific behaviorCreated or updated an example program if it would help users understand this functionalityThis PR fixes this issue: #4041
The code I deleted has a validation to check if the new window bounds which Windows is suggesting to move the monitor to is actually on the monitor which triggered the
WM_DPI_CHANGED
event. If that validation fails, it tried to move the window such that it will be on the monitor which triggered theWM_DPI_CHANGED
event. However, this validation was buggy and was actually causing this bug. It was moving the window off of the intended monitor. It seems this is no longer necessary. For example, Chromium's DPI changed handler does not contain an analogous check.Before
https://www.loom.com/share/aefc5dc1027a42fc8f462c23621ce9a5
After
https://www.loom.com/share/81351dcb5938463c8bb60a66b2a0641b