On Fri, 20 Dec 2024 19:22:35 GMT, Alisen Chung <ach...@openjdk.org> wrote:
>> @aivanov-jdk >> I see your point. But I'm running into NPE at >> `MouseInfo.getPointerInfo().getLocation()` without the fix as well (dual >> monitor, extended display setup) >> >> Is it expected of MouseInfo.getPointerInfo() to return null for off-screen >> coordinates (meaning does it consider it as mouse not available if it is >> outside the screen devices)? >> >> PointerInfo has two things associated with it - screen device and a >> location, so if it is not able to associate the coordinate with any of the >> screen device (off-screen coordinate) is it suppose to return null in this >> case? > > Interesting. Does this also happen after the fix with Robot clamping > coordinates in shared code? @alisenchung @honkar-jdk @prrace Things align: if the main monitor is on the right, and the secondary monitor is to the left of the main one, `Robot.mouseMove(20_000, 200)`, the following call to `MouseInfo.getPointerInfo()` returns `null`. Both Harshitha and I see `null` in such a configuration both with and without the fix… on Windows and Mac. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22781#discussion_r1894405687