r-Larch / MouseTrap

A small tool to map the cursor between monitors with different DPIs
MIT License
46 stars 2 forks source link

Unexpected Cursor Teleportation #2

Closed wildmanlennox closed 4 years ago

wildmanlennox commented 5 years ago

on some passes between monitors, the cursor will jump to the center of the next screen

r-Larch commented 5 years ago

This is most likely because of my simple fix to a weird windows behavior. Where windows does not allow the mouse to travel across desktop regions that are not painted to any screen.

Example:

  ___________  ____________
 |           | not painted |
 |           |_________
 |  Sceen1   |         |
 |           | Sceen2  |
 |___________|_________|

Problem:

The mouse can not move between two points when the straight line connecting both points goes through a not painted region.

Simple Solution:

For every teleportation, move the mouse to the center of the target screen and from there move it to the destination position.

Advenced Solution:

Do some fancy math to always find the rigth path.

Could this be the case for you?

Can you please send me a screenshot of the "Mousetrap Settings" window where your screens setup is visible?

wildmanlennox commented 5 years ago

Further Info: the problem can be reproduced at any location between monitors, simply wiggle the mouse back and forth and it will happen eventually. Also my monitors differ in resolution but are the same physical size image

r-Larch commented 5 years ago

Thanks, I will see what i can do.

Majzer commented 4 years ago

It's still happening.

ThaBoss07 commented 4 years ago

Just downloaded and testing. This issue still exists. Mouse will jump to center of screen you are moving cursor to. Will update if more problems arise but so far super smooth.

r-Larch commented 4 years ago

@ThaBoss07 I can't reproduce this bug on any computer or configuration.

Can you specify your configuration?

lxk3il commented 4 years ago

I just did a fresh install and can confirm this issue with the following setup:

[{"ScreenId":0,"Name":"Screen1","TopBridge":null,"LeftBridge":null,"RightBridge":{"TopOffset":0,"BottomOffset":361,"TargetScreenId":1},"BottomBridge":null},{"ScreenId":1,"Name":"Screen2","TopBridge":null,"LeftBridge":{"TopOffset":0,"BottomOffset":0,"TargetScreenId":0},"RightBridge":null,"BottomBridge":null}]

@wildmanlennox already described how the problem can be reproduced, for example by wiggling the mouse back and forth between screens

r-Larch commented 4 years ago

Mousetrap v1.0.6 is released

In this version, I've done some optimizations regarding this Problem. Please try it out and report back if the issue is resolved.

I will close this issue now and if the problem continues to occur, then please reopen the issue or create a new one.

Changelog

Version 1.0.6

lxk3il commented 4 years ago

Thanks for the update! I just tested it, but unfortunately it seems that the issue still persists.

Setup is the same as described in https://github.com/r-Larch/MouseTrap/issues/2#issuecomment-731729920

r-Larch commented 4 years ago

Can you please reproduce the bug with realtime loggong on, in the new diagnostic window, and send me then the diagnostic data to analyze.

Thanks for this quick reaction

lxk3il commented 4 years ago

I did a complete reinstall of the new release now and the problem seems to be solved now. No more cursor teleportation. Will observe it further and let you know, when the problem arises again.

But it seems to be fixed for now, thank you very much!

r-Larch commented 4 years ago

I'm happy to hear that, thank you.

I suspect on your first try you got the victim of my mechanism to only keep one instance running, because this mechanism awakes the running instance (if there is one) instead of running a new one. This means you can double click on the new version and what happens is, it opens the settings screen of the old (currently running) version.

Have a nice day!