octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.26k stars 937 forks source link

Use signed coordinates for mouse events #670

Open gerhardberger opened 3 years ago

gerhardberger commented 3 years ago

This PR changes mouse click/toggle/doubleclick coordinate calculation to signed version. Previously it was unsigned, which caused click events to register at incorrect positions, if the click happened at a negative coordinate value, which can happen in macOS's screen coordinate system.

nickretallack commented 2 years ago

I tested this out on my mac and it works great! Thanks!