On Sat, 15 Mar 2025 00:16:46 GMT, Alisen Chung <ach...@openjdk.org> wrote:
> The click occurs at the edge of the screen. You can run the test attached > with the screenshot mode on (this will display the mouse location) and once > the test is finished the mouse will display coordinates at the edge of the > screen. If you move any windows onto the edge of the screen where the mouse > appears to end up and run the test again, then do a simple manual click, that > window will gain focus. So the actual mouse pointer isn't at (10000,10000) > but rather at the edge of the screen. 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. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22781#issuecomment-2751687192