On Wed, 6 Aug 2025 07:04:52 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>>> In Windows machines, the click lands on the reduce control of the window, 
>>> and this causes the windows to be iconified and the test fails.
>> 
>> WHich test in particular? or is it all tests have this behavior?
>> 
>>> The test needs to click on the middle of the Windows title bar (Outside of 
>>> the controls) to pass.
>> 
>> I tried JMenuBarOverlapping.java but I dont see any click on title bar..The 
>> cursor in on top-left of "Test Menu" menu..
>> If clicking on the title bar is needed to make it gain focus, probably you 
>> can try with calling `frame.requestFocus` and use `CountDownLatch `with 
>> timeout to wait till FOCUS_GAINED event is received and release the latch in 
>> `focusGained()` and then start the test
>
>> @prsadhuk after applying your suggested change, I can see that it has fixed 
>> the issue for most of the tests but still the following tests didn't pass on 
>> Windows compared with the original fix of changing frame width :
>> 
>> java/awt/Mixing/AWT_Mixing/JProgressBarInGlassPaneOverlapping.java 
>> java/awt/Mixing/AWT_Mixing/JScrollBarInGlassPaneOverlapping.java 
>> java/awt/Mixing/AWT_Mixing/JSliderInGlassPaneOverlapping.java 
>> java/awt/Mixing/AWT_Mixing/JTextAreaInGlassPaneOverlapping.java 
>> java/awt/Mixing/AWT_Mixing/JTextFieldInGlassPaneOverlapping.java 
>> java/awt/Mixing/AWT_Mixing/JToggleButtonInGlassPaneOverlapping.java 
>> java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java
>> 
>> I will check why these tests had failed.
> 
> I see this tests are also deproblemlisted despite mentioning they fail, so my 
> idea of CountDownLatch for focus gain event solved these too?

@prsadhuk All tests passed after the applying both changes: Awaiting time set 
to one second and checking if component has focus first before requesting focus.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25971#issuecomment-3160091352

Reply via email to