RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v11]
Sergey Bylokhov
serb at openjdk.org
Wed Apr 30 21:20:50 UTC 2025
On Tue, 25 Mar 2025 15:36:40 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> So this seems to be a bug in macOS, as the reported mouse location is incorrect while it is actually positioned at the edge?
>
> Probably, there are other macOS APIs that could be used to implement Java_sun_lwawt_macosx_CCursorManager_nativeGetCursorPosition. Or perhaps the methods within it should be called on the appkit thread - I see a potential race, since the mouse is moved asynchronously on appkit, but the coordinates are fetched on the current thread.
Did you have a chance to check our implementation of setting and getting the cursor?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22781#issuecomment-2843306094
More information about the client-libs-dev
mailing list