RFR: 8296972: [macos13] java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java: getExtendedState() != 6 as expected.

Dmitry Markov dmarkov at openjdk.org
Tue May 30 20:34:57 UTC 2023


On Tue, 30 May 2023 18:41:38 GMT, Alisen Chung <achung at openjdk.org> wrote:

> added displayChanged call to CPlatformWindow when frame first needs to deiconify or unmaximize
> All client tests passed after change

Changes requested by dmarkov (Reviewer).

src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java line 989:

> 987:                     // the zoom call toggles between the normal and the max states
> 988:                     unmaximize();
> 989:                     peer.displayChanged();

Why do you call `peer.displayChanged()` only when the previous windows state is `MAXIMIZED_BOTH`? What happens if the previous windows state is `NORMAL`?

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?

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

PR Review: https://git.openjdk.org/jdk/pull/14226#pullrequestreview-1451769898
PR Review Comment: https://git.openjdk.org/jdk/pull/14226#discussion_r1210794283
PR Review Comment: https://git.openjdk.org/jdk/pull/14226#discussion_r1210794376



More information about the client-libs-dev mailing list