Closed
Conversation
Updates the application to use virtual screen coordinates instead of single-screen coordinates for mouse event handling. This ensures correct behavior across multiple monitors with different resolutions or arrangements. This change affects the calculation of absolute mouse coordinates and ensures that mouse events are properly transmitted to the target window in multi-monitor setups.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the application to use virtual screen coordinates instead of single-screen coordinates for mouse event handling in multi-monitor setups. This ensures that mouse events are correctly processed and transmitted across monitors with different resolutions or arrangements.
Key changes:
- Renamed coordinate dimension variables from
_smCxScreen/_smCyScreento_smCxVirtualScreen/_smCyVirtualScreen - Updated system metrics calls to use
SM_CXVIRTUALSCREENandSM_CYVIRTUALSCREENinstead ofSM_CXSCREENandSM_CYSCREEN - Added
MOUSEEVENTF_VIRTUALDESKflag to mouse event flags to enable virtual desktop coordinate space - Added debug logging for virtual screen dimensions
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adjusts mouse coordinate calculations to account for virtual screen offsets. This ensures accurate mouse input even when the virtual screen is offset from the primary display, resolving issues with multi-monitor setups.
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.
Updates the application to use virtual screen coordinates
instead of single-screen coordinates for mouse event
handling. This ensures correct behavior across multiple
monitors with different resolutions or arrangements.
This change affects the calculation of absolute mouse
coordinates and ensures that mouse events are properly
transmitted to the target window in multi-monitor setups.