Hello, Anton.

Are we sure that the behavior of ICONIFIED | MAXIMIZED_BOTH should be the same 
as just ICONIFIED? 
What does this combination of flags do on other platforms? 

I would expect that if the frame is not maximized, this combination would 
iconify it, but when you deiconify the frame
should go to maximized state. However, I’m quite sure you can’t do it like this 
on Mac OS X, because we use the native 
zoom mechanism for maximization and do not have enough control over it. So, in 
my opinion this should be fixed by 
making Frame.isFrameStateSupported return false for this combination. What do 
you think?

With best regards. Petr.

21 янв. 2014 г., в 3:27 после полудня, Anton Litvinov 
<[email protected]> написал(а):

> Hello,
> 
> Could you please review the following fix for the bug.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8032078
> Webrev: http://cr.openjdk.java.net/~alitvinov/8032078/jdk9/webrev.00
> 
> The bug consists in undocumented throwing of "RuntimeException" from the 
> method "Frame.setExtendedState" for the compound state "ICONIFIED | 
> MAXIMIZED_BOTH" that is supported according to a result of 
> "Frame.isFrameStateSupported" method call on OS X.
> 
> The solution adds handling of the mask "ICONIFIED | MAXIMIZED_BOTH" to 
> "switch" block of the method 
> "sun.lwawt.macosx.CPlatformWindow.setWindowState" which duplicates existing 
> handling of the state "ICONIFIED" and prevents from throwing of the exception.
> 
> Thank you,
> Anton

Reply via email to