Hi Sergey, It looks a fix went in awt_Win32GraphicsDevice.cpp updating the size scaling under the bug JDK-8159062. I will get back with more details on it on Monday.
Thanks and regards, Shashi -----Original Message----- From: Sergey Bylokhov Sent: Saturday, February 3, 2018 1:38 PM To: Shashidhara Veerabhadraiah <[email protected]>; [email protected] Subject: Re: <AWT Dev> [11] JDK-8196006: java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java fails On 02/02/2018 23:50, Shashidhara Veerabhadraiah wrote: > Hi Sergey, Main reason to change the test to run on the main screen is that > the test runs thro's different graphics configurations whereas keeping the > AWT frame in the same main screen. This leads to wrong calculations. Also for > the intent of the test it is not required to run on all the graphics > configurations. Yes and it is one of the use-cases tested in the test: the frame located on one screen should be able to maximize to some other screen. > > The problem is that getBounds() of the GraphicsConfiguration class returns > the scaled size which is used as an initial input to set the maximized bounds > by calling setMaximizedBounds(). As you said, frame.getBounds() returns the > user space size. Hence we would need to transform it. It sounds like a bug. At least on mac it works as expected on the retina screen. In the GraphicsConfiguration.getBounds() there are also attempts to scale down coordinates on linux/windows, it is unclear why it does not work. > > Thanks and regards, > Shashi > > -----Original Message----- > From: Sergey Bylokhov > Sent: Saturday, February 3, 2018 12:20 PM > To: Shashidhara Veerabhadraiah <[email protected]>; > [email protected] > Subject: Re: <AWT Dev> [11] JDK-8196006: > java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java fails > > Hi, Shashi. > > Before this fix this test was executed on all screens on the system. > Why have you changed it to test only main screen? > > If I understand the code correctly the test checks the size which is passed > to frame.setMaximizedBounds() and the size which is returned by > frame.getBounds(). In both cases the size should be in the users space(not in > pixels). Why additional transform(added in the fix) is necessary? > > On 01/02/2018 20:39, Shashidhara Veerabhadraiah wrote: >> Hi All, Please review a fix for the test bug. >> >> Bug: https://bugs.openjdk.java.net/browse/JDK-8196006 >> >> Webrev: http://cr.openjdk.java.net/~sveerabhadra/8196006/webrev.00/ >> >> Summary: This test fails on a hidpi monitor whereas passes on a normal >> monitor. Now the calculations are altered to take care of the scaling >> factor of the primary display unit. Now this test passes on both >> normal and hidpi monitors. >> >> Thanks and regards, >> >> Shashi >> > > > -- > Best regards, Sergey. > -- Best regards, Sergey.
