<AWT Dev> <AWT dev>[12] Review request for JDK-8209123: [Macosx] Maximized frame is resizable on Mac but not on Windows and Ubuntu

Manajit Halder manajit.halder at oracle.com
Fri Nov 30 13:44:16 UTC 2018

Hi Sergey,

When the use clicks on the title bar then frame is moved to the either zoom or minimize depending upon the System Preferences -> Dock setting.
With my fix if a frame state is MAXIMIZED_BOTH, the frame resizibility is set to true to allow the frame to go to the set state (zoom or minimize). The frame resizibility is reset back to false to maintain the MAXIMIZED_BOTH frame behaviour proposed in my fix. If the “updateResizableAndMaximizeState(true) is not called then a MAXIMIZED_BOTH frame becomes resizable and breaks the behaviour.


> On 28-Nov-2018, at 5:31 AM, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
> Hi, Manajit.
> Can you please clarify the change in the "deliverDoubleClickOnTitlebar"?
> As far as I understand if the user clicks on the title bar of the "maximized frame" then
> the frame is moved to the normal state, but in the fix you set "updateResizableAndMaximizeState(true)"
> which changed the frame to non-resizable.
> On 21/09/2018 04:37, Manajit Halder wrote:
>> Hi All,
>> Please review the fix for JDK12.
> Bug:
>> https://bugs.openjdk.java.net/browse/JDK-8209123 <https://bugs.openjdk.java.net/browse/JDK-8209123>
>> <https://bugs.openjdk.java.net/browse/JDK-8206392 <https://bugs.openjdk.java.net/browse/JDK-8206392>>
> Webrev: 
>> http://cr.openjdk.java.net/~mhalder/8209123/webrev.00/ <http://cr.openjdk.java.net/~mhalder/8209123/webrev.00/> <http://cr.openjdk.java.net/%7Emhalder/8209123/webrev.00/ <http://cr.openjdk.java.net/%7Emhalder/8209123/webrev.00/>>
>> Fix: 
>>     Resizibility of Frame with state MAXIMIZED_BOTH is set to false when Frame is resized and when Frame state is set. Resizibility of Frame in other states (NORMAL and ICONIFIED) is changed if the previous state of the frame was MAXIMIZED_BOTH otherwise it is not changed.
>> Changes in method setResizable()
>>  1) if setResizable passed true, then check if frame is in MAXIMIZED_BOTH state, if so then set setResizable to false, otherwise set to true.
>>  2) if setResizable passed false, then set false without checking the frame MAXIMIZED_BOTH state.
>> Changes done in method setVisible and setWindowState where Frame state is set:
>>  1) Before setting any state check if resizibility was changed to MAXIMIZED_BOTH earlier, if so then set resizibility to false.
>>  2) When Frame state is set to MAXIMIZED_BOTH then set resizibility to false.
>> JCK and Jtreg (open and close) tests executed with the change:
>>  1) All automated AWT and Swing tests.
>>  2) All manual AWT and Swing tests related to Frame, Window, JFrame and JWindow.
>> Regards, 
>> Manajit
> -- 
> Best regards, Sergey.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20181130/a53514ca/attachment-0001.html>

More information about the awt-dev mailing list