<AWT Dev> [9] Review request for 8065739 [macosx] Frame warps to lower left of screen when displayed

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Fri May 8 12:42:33 UTC 2015


Hi, Alexander.
Does the new tests cover all corner cases which we discussed offline?

On 08.05.15 15:28, Alexander Scherbatiy wrote:
>
>   Hello,
>
>  Could you review the updated fix:
>    http://cr.openjdk.java.net/~alexsch/8065739/webrev.03
>
>  - The -windowWillUseStandardFrame:defaultFrame: method is implemented 
> in AWTWindow to correctly get and check a size of the maximized window.
>    After that the -isZoomed method correctly defines the zoomed state 
> for both visible and not visible window.
>
>  Thanks,
>  Alexandr.
>
> On 4/29/2015 7:03 PM, Alexander Scherbatiy wrote:
>>
>>  Hello,
>>
>>  Could you review the updated fix:
>>    http://cr.openjdk.java.net/~alexsch/8065739/webrev.02
>>
>>   - the zoom state is applied after NSWindow creation if Frame has 
>> MAXIMIZED_BOTH state.
>>
>>  Thanks,
>>  Alexandr.
>>
>> On 4/15/2015 10:57 PM, Sergey Bylokhov wrote:
>>> Hi, Alexander.
>>> As far as I understand the main issue is that we get a native 
>>> notifications during window initialization(after nswindows was 
>>> created and before zoom method will be called)? Probably we can 
>>> apply the zoom state when we create a window in one appkit call?
>>>
>>> On 08.04.15 17:54, Alexander Scherbatiy wrote:
>>>> Hello,
>>>>
>>>> Could you review the fix:
>>>>   bug: https://bugs.openjdk.java.net/browse/JDK-8065739
>>>>   webrev: http://cr.openjdk.java.net/~alexsch/8065739/webrev.00
>>>>
>>>>   Use case:
>>>>   ------------
>>>>   Frame frame = new Frame();
>>>>   frame.pack();
>>>>   frame.setBounds(screenBounds);
>>>>   frame.setVisible(true);
>>>>   ------------
>>>>
>>>>   The frame is in the normal state but Mac OS X treats a frame with 
>>>> screen bounds as zoomed.
>>>>   The setVisible() method calls unmaximize() method to return the 
>>>> zoomed window to the normal state.
>>>>   The native zoom() method sets the initial sizes for the window 
>>>> which are zero because of the pack() call.
>>>>
>>>>
>>>>   There is already checkZoom() method which synchronizes native 
>>>> window zoom state and and the frame extended state when a frame is 
>>>> resized by mouse.
>>>>   However it can't be always used for the synchronization between 
>>>> native window zoom state and setBounds() call because of the 
>>>> following case:
>>>>
>>>>   -----------------
>>>>   Frame frame = new Frame();
>>>>   frame.setBounds(smallBounds);
>>>>   frame.setExtendedState(Frame.MAXIMIZED_BOTH);
>>>>   frame.setVisible(true);
>>>>   -----------------
>>>>
>>>>   This is the valid scenario where the frame should be maximized.
>>>>
>>>>   The solution synchronizes the zoom and the frame state only when 
>>>> the native window is zoomed.
>>>>   In opposite case we need to return from the zoomed sizes to 
>>>> previous sizes which are the same as for the zoomed window.
>>>>
>>>> Thanks,
>>>> Alexandr.
>>>>
>>>
>>>
>>
>


-- 
Best regards, Sergey.



More information about the awt-dev mailing list