Repository navigation
Windows: Fix drag mouse position for parented windows (bugfix) - take 2 - #368
Open
AlexCharlton wants to merge 2 commits into
Open
AlexCharlton wants to merge 2 commits into
AlexCharlton wants to merge 2 commits into
Conversation
Apply DPI-aware conversion around ScreenToClient in HWnd::screen_to_client
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.
Reprising #253
To summarize from the previous PR: Some hosts (though, the only one I can find that does this is Bitwig) can have drag-n-drop points coming from an OLE process that doesn't share the same coordinate space as the HNDW. Calls to
ScreenToClientmust be wrapped with calls toPhysicalToLogicalPointForPerMonitorDPIandLogicalToPhysicalPointForPerMonitorDPIto correct this.This PR adds these wrapper calls, gated on whether or not the window is actually DPI-aware in the first place. This gating is necessary since some hosts (Ableton with "Auto-Scale Plug-In Window" toggled on) can create DPI-unaware windows.
Tested on: