<AWT Dev>  JDK-8196017: java/awt/Mouse/GetMousePositionTest/GetMousePositionWithPopup.java fails
Sergey.Bylokhov at oracle.com
Thu Mar 1 21:28:34 UTC 2018
On 01/03/2018 02:41, Shashidhara Veerabhadraiah wrote:
> Sergey, we have a floating point dpi scale(dpi value/96) and we use it to scale down and up to convert from user space to device space and vice versa. This code is present at awt_Win32GraphicsDevice.cpp. In this code if you see we use clipRound() with ceil() function. Since there float to int involved with ceil operation may cause + or - 1 pixel variation in it's value I think. Please correct me if I am wrong here.
The similar code is executed when we set the size of the frame/window,
we convert size in the user space to device space, and we do the
opposite when we request the size of the frame. Same with robot API,
when we move the mouse to some point and request the location of cursor.
We should try to implement mouse events in the similar way.
> Since there is an issue with windows 10 build 1703 and also the original fix is mac specific, I think my test fix to keep it specific to mac is the right decision to make. Please correct me if I am wrong here.
This test is not a mac specific, there is no any platforms specific code.
Best regards, Sergey.
More information about the awt-dev