On Thu, 1 Jun 2023 20:24:21 GMT, Alisen Chung <ach...@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

Reply via email to