On Tue, 30 May 2023 20:31:55 GMT, Dmitry Markov <dmar...@openjdk.org> wrote:

>> added displayChanged call to CPlatformWindow when frame first needs to 
>> deiconify or unmaximize
>> All client tests passed after change
>
> 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.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14226#discussion_r1213643426

Reply via email to