On Mon, 5 Oct 2026 09:25:17 GMT, Jayathirth D V <[email protected]> wrote:

>> GetScreenLocTest is mainly checking whether getLocationOnScreen() picks 
>> proper information.
>> 
>> With latest JDK code this test fails locally on macOS and windows, mostly 
>> because mouse event is not getting recognised because of decorated window. 
>> On local Oracle Linux VM, i can see that sometimes the smaller frame is not 
>> even shown and test fails. We need to make the windows undecorated and make 
>> sure things are rendered before we start selecting things on the frame.
>> 
>> After making test more robust, it runs fine on all platforms.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Jayathirth D V has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - PL on windows
>  - Revert scale and EDT

test/jdk/java/awt/Component/GetScreenLocTest/GetScreenLocTest.java line 151:

> 149:     public static void main(String[] args) throws Exception {
> 150:         try {
> 151:             EventQueue.invokeAndWait(GetScreenLocTest::createAndShowGUI);

invokeAndWait is still used here and in dispose. note that in this place it 
actually "freezes" the state initialized on the EDT, and the test() on the main 
will see the correct state. But without the EDT it is possible that something 
will be initialized on the EDT and something on the main thread, which may 
cause some issues if awt lacks synchronization on that code path.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32764#discussion_r4189706526

Reply via email to