RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v13]
Alisen Chung
achung at openjdk.org
Tue May 27 17:31:05 UTC 2025
On Fri, 23 May 2025 00:24:17 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> Alisen Chung has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 17 commits:
>>
>> - Merge branch 'master' of https://github.com/openjdk/jdk into 8345538
>> - move clamping code into macos
>> - use absolute distance to choose correct screen for offscreen clamping
>> - helper function
>> - grab screen data on mouseMove
>> - fix bounds
>> - peer.mouseMove
>> - fix implementation
>> - robot update
>> - Revert "robot multimonitor fix"
>>
>> This reverts commit 5734165881a66dc48d5a9f19e02bf63fac57cdc9.
>> - ... and 7 more: https://git.openjdk.org/jdk/compare/8b16897b...e0a5c872
>
> test/jdk/java/awt/Robot/MouseMoveOffScreen.java line 80:
>
>> 78: }
>> 79: return p;
>> 80: }
>
> I believe validateOffScreen() was added to prevent edge or boundary case rounding error as observed here - https://github.com/openjdk/jdk/pull/22781/files#r1926210713
This check was added to ensure that the offscreen point chosen was indeed offscreen. https://github.com/openjdk/jdk/pull/22781#discussion_r1929111847
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22781#discussion_r2109775306
More information about the client-libs-dev
mailing list