On macosx-aarch64 system, mouse cursor is also captured on screen capture. Fix is to reset the mouse position before screen capture (some minor code warning removed with the fix). Several iterations passed in CI.
------------- Commit messages: - Fix - Reset Mouse position Changes: https://git.openjdk.org/jdk/pull/30177/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30177&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354901 Stats: 37 lines in 1 file changed: 7 ins; 15 del; 15 mod Patch: https://git.openjdk.org/jdk/pull/30177.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30177/head:pull/30177 PR: https://git.openjdk.org/jdk/pull/30177
