RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v11]

Alisen Chung achung at openjdk.org
Fri May 16 02:02:55 UTC 2025


On Mon, 5 May 2025 22:45:50 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> I propose developing a native reproducer to investigate the mouse position clamping behavior observed on macOS. The steps would include:
> 
> 1. Moving the mouse cursor outside the screen bounds.
> 2. Retrieving the current mouse position.
> 3. Simulating a mouse click at the current position.
> 4. Retrieving the mouse position again.
> 5. Comparing the positions from steps 2 and 4.

I have attached a native reproducer to the JBS issue. The result is that getting the location of the mouse after the mouseMove and mousePress/Release both result in the offscreen coordinates, so it is reproducible natively.

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

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


More information about the client-libs-dev mailing list