Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix transition between screens of different sizes on macos. #227

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rygwdn
Copy link
Contributor

@rygwdn rygwdn commented Feb 14, 2025

When screens on macos have different physical sizes, macos will only allow the mouse to move between the screens where it thinks they overlap
image

This change bumps the cursor to the vertical middle of the edge of the screen before using relative movement to bump it onto the next display, making it much more likely that the cursor will be able to cross. The jump is sometimes noticeable, but it is pretty quick.

Should this be configurable?

@eltariel
Copy link
Contributor

Using the vertical middle should be significantly more reliable in most cases than just attempting to move across the border at the current pointer location. I've had similar thoughts about this: #56 (comment)

I think there needs to be a toggle for this. It's more distracting than helpful if you've got two screens with the same resolution that line up nicely, but there are also cases where it is completely broken:

  • If you have a tiny screen top-aligned next to a huge screen, you can only switch at the midpoint on the smaller screen
  • If you do something odd like align the bottom third of one monitor with the top third of another, there is no Y position that you can jump to that will let you switch in both directions (I know people who do this because it matches their physical screen layout 🤷)

If we want it to work reliably without having to configure screen edges there may be a trick we can use by moving diagonally but I keep thinking of ways that would break too 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants