On Tue, 20 Jun 2023 20:08:20 GMT, Alisen Chung <[email protected]> wrote:
>> added displayChanged call to CPlatformWindow when frame first needs to
>> deiconify or unmaximize
>> All client tests passed after change
>
> Alisen Chung has updated the pull request incrementally with one additional
> commit since the last revision:
>
> updated test lastFrameState variable
Changes requested by dmarkov (Reviewer).
src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java line 969:
> 967: }
> 968:
> 969: private void waitForWindowState(int state) {
It would be wise to check the state of the peer in the beginning to avoid
unnecessary usage of WindowStateListener and wait-notify mechanism if we are
already in the state which is required.
src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java line 971:
> 969: private void waitForWindowState(int state) {
> 970: Object lock = new Object();
> 971: target.addWindowStateListener(new WindowStateListener() {
I think WindoweStateListener should be removed once we are done
test/jdk/java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java line 48:
> 46: public class MaximizedToIconified
> 47: {
> 48: static volatile int lastFrameState;
What is the purpose of test change? Can you elaborate, please?
-------------
PR Review: https://git.openjdk.org/jdk/pull/14226#pullrequestreview-1490108322
PR Review Comment: https://git.openjdk.org/jdk/pull/14226#discussion_r1236601686
PR Review Comment: https://git.openjdk.org/jdk/pull/14226#discussion_r1236603661
PR Review Comment: https://git.openjdk.org/jdk/pull/14226#discussion_r1236605943