On Fri, 20 Dec 2024 20:42:05 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:
>>> For me, the test _without the fix_ prints >>> >>> ``` >>> Current mouse location: java.awt.Point[x=0,y=200] >>> ``` >>> >>> The mouse cursor moves to 200, 200 and then to 0, 200 on the screen. >> >> >> What platform ? Alisen did say in the description that Windows & Linux clamp >> which presumably is either something elsewhere in the JDK implementation, or >> just how the platform works. I looked (briefly) at Linux and we just pass >> the values to XWarpPointer so I assumed it was the platform .. > > In MouseInfo.getPointerInfo() > The point is updated here > [fillPointWithCoords()](https://github.com/openjdk/jdk/blob/7ba969a576eb92446e40587fecf98e1e4aba8883/src/java.desktop/share/classes/java/awt/MouseInfo.java#L72) > . > > and what follows after > > > for (int i = 0; i < gds.length; i++) { > GraphicsConfiguration gc = gds[i].getDefaultConfiguration(); > Rectangle bounds = gc.getBounds(); > if (bounds.contains(point)) { > // checks if the point updated by fillPointWithCoords > // is within the bounds of any of the screen device else > it returns null > retval = new PointerInfo(gds[i], point); > } > } I ran it on Windows, sorry I should've said it explicitly. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22781#discussion_r1894374867