Skip to content

Uses virtual screen coordinates#22

Closed
magicxor wants to merge 2 commits intomasterfrom
feature/use-virtual-screen-coords
Closed

Uses virtual screen coordinates#22
magicxor wants to merge 2 commits intomasterfrom
feature/use-virtual-screen-coords

Conversation

@magicxor
Copy link
Owner

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.

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.
Copilot AI review requested due to automatic review settings November 24, 2025 01:39
@magicxor magicxor self-assigned this Nov 24, 2025
@magicxor magicxor added the enhancement New feature or request label Nov 24, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/_smCyScreen to _smCxVirtualScreen/_smCyVirtualScreen
  • Updated system metrics calls to use SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN instead of SM_CXSCREEN and SM_CYSCREEN
  • Added MOUSEEVENTF_VIRTUALDESK flag 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.
@magicxor magicxor closed this Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant