Hello All,

 

Please review the following fix in JDK11 :

 

Bug : https://bugs.openjdk.java.net/browse/JDK-8197926 

Webrev : http://cr.openjdk.java.net/~jdv/8197926/webrev.00/ 

 

Issue: If we enable HiDPi setting in Windows to approximately 125% or more, 
java/awt/dnd/ImageTransferTest/ImageTransferTest.java times out and doesn't 
dispose the created Java windows.

 

Root cause : In Windows because of default insets parameters, frames created in 
test case overlap and over that if we enable HiDPi setting the mouse drag and 
drop calculation is not proper and this results in time out and created frames 
are not disposed properly.

 

Solution: The default frame insets behave differently in different 
platforms(Windows, Unix & MacOS). Since the main objective of test case is to 
transfer image from one frame to another and validate, there is no need for us 
to have frame with insets. Making the frame Undecorated results in uniform 
behavior across all platforms and test case passes. I have verified the test 
case after change in Windows, Ubuntu and MacOS and there are no side effects.

 

Observation : In the test case we are creating second frame using 
"ProcessCommunicator.executeChildProcess()".  If we want to reproduce the issue 
using "-Dsun.java2d.uiScale" from command prompt the ProcessCommunicator will 
pick default scale values and second window will not be of required dimensions. 
We can pass "-Dsun.java2d.uiScale" value to 
ProcessCommunicator.executeChildProcess() like 
(ProcessCommunicator.executeChildProcess(ImageDropTarget.class, classpath+" 
-Dsun.java2d.uiScale=2", args)) but I didn't find a way to get "uiScale" value 
passed in command prompt into the test case. 
System.getProperty(sun.java2d.uiScale) returns null. 

 

If there is a way to get uiScale value passed in command prompt in the test 
case we can pass it to ProcessCommunicator.executeChildProcess() so that we can 
reproduce the issue by just passing VM option to jtreg. As of now to reproduce 
the issue we should go to Personalize->Display and change HiDPi setting.

 

Thanks,

Jay

 

Reply via email to