RFR: 8296972: [macos13] java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java: getExtendedState() != 6 as expected.
Alisen Chung
achung at openjdk.org
Thu Jun 1 20:27:15 UTC 2023
On Thu, 1 Jun 2023 20:24:21 GMT, Alisen Chung <achung at openjdk.org> wrote:
>> src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java line 997:
>>
>>> 995: // let's return into the normal states first
>>> 996: execute(CWrapper.NSWindow::deminiaturize);
>>> 997: peer.displayChanged();
>>
>> Same as above. What happens if we move from `NORMAL` to `MAXIMIZED_BOTH`?
>>
>> Shall we call `peer.displayChanged()` when a frame is moved to `NORMAL` state? I know that cases are not covered by the test but it seems the issue takes place there. Can you investigate, please?
>
> I believe the main issue is that there is a native event that changes the window state, but when two state changes are done back to back sometimes that native event isn't delivered quickly enough before the second state change occurs, which causes this test to fail. When a frame is moved to a normal state, there are no back to back state changes, since all we do is change the state back to normal.
If I set a delay between the state changes, the problem will also disappear and the test passes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14226#discussion_r1213644016
More information about the client-libs-dev
mailing list