On Tue, 28 Jan 2025 19:12:30 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

> I would like to clarify one point: if the robot moves the mouse off the 
> screen while the actual mouse pointer is on the screen and immediately 
> presses the mouse button, where will the click occur? on or off the screen?

In macOS code there is similar method that checks for mouse offscreen locations 
called checkMousePos() which updates and clamps the mousePosition stored in 
CRobot and is called after mousePress and mouseRelease, but I think it makes 
more sense to do the clamping during the mouseMove instead of having the mouse 
move to nonexistent coordinates then performing operations on a clamped 
location based on those nonexistent coordinates.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/22781#issuecomment-2625496940

Reply via email to