<AWT Dev> [10] JDK-8190192: Double click on the title bar no longer repositions the window

Shashidhara Veerabhadraiah shashidhara.veerabhadraiah at oracle.com
Tue Nov 21 07:19:11 UTC 2017

Hi Sergey, When we drag the window by holding the title bar, the size of the window does not changes but the zoom state is false. The current logic compares the size and based on that it returns true or false and since window size remains same even after movement, the window does not get zoomed out. This is also proved when I checked for the earlier code where it worked  ealier. Here it is as per "https://java.se.oracle.com/source/xref/jdk7u-cpu/jdk/src/macosx/native/sun/awt/AWTWindow.m" and they use the window isZoomed state to trigger a zoom or not. I do not know the reason why this logic was changed to window size based triggers though.

My current change also utilizes the zoom state  of the window to trigger the zoom or not. Hope this answers your question.

Thanks and regards,

-----Original Message-----
From: Sergey Bylokhov 
Sent: Tuesday, November 14, 2017 3:28 AM
To: Shashidhara Veerabhadraiah <shashidhara.veerabhadraiah at oracle.com>; Philip Race <philip.race at oracle.com>; awt-dev at openjdk.java.net
Subject: Re: <AWT Dev> [10] JDK-8190192: Double click on the title bar no longer repositions the window

Hi, Shashi.
did you find what change caused this problem?

On 07/11/2017 02:00, Shashidhara Veerabhadraiah wrote:
> Hi, Please find the updated Webrev at:
> http://cr.openjdk.java.net/~sveerabhadra/8190192/webrev.01/
> The issue was that upon clicking on the title bar twice would invoke
> windowShouldZoom() which was returning false /_always_/ to the appkit, 
> thereby blocking the window from getting zoomed /_all the time_/. Now 
> the logic is simplified as there is an existing zoom state of the 
> window being maintained internally by the appkit and my change would 
> use it instead of trying to make up our own logic.
> Thanks and regards,
> Shashi
> *From:*Philip Race
> *Sent:* Sunday, October 29, 2017 10:16 PM
> *To:* shashidhara veerabhadraiah 
> <shashidhara.veerabhadraiah at oracle.com>
> *Cc:* Sergey Bylokhov <sergey.bylokhov at oracle.com>; 
> awt-dev at openjdk.java.net
> *Subject:* Re: <AWT Dev> [10] JDK-8190192: Double click on the title 
> bar no longer repositions the window
> Hello,
>  > This seems a regression in JDK 8 as it worked fine in 7u80.
> That is too vague for my taste. Precisely what fix caused this regression ?
> Once you find that you may find some additional insight into the issue 
> .. and not regress something else.
>  From a quick scan of the history of AWTWindow.m my top candidate is
> 8026143: [macosx] Maximized state could be inconsistent between peer 
> and frame
> So if this regression starts from 8b115 that is quite likely the cause.
> Also why is it not possible to include an automated Robot regression test ?
> -phil.
> On 10/29/17, 7:51 AM, shashidhara veerabhadraiah wrote:
>     Hi All, Please review a fix for the below bug:
>     Bug: https://bugs.openjdk.java.net/browse/JDK-8190192
>     Webrev: http://cr.openjdk.java.net/~sveerabhadra/8190192/webrev.00/
>     <http://cr.openjdk.java.net/%7Esveerabhadra/8190192/webrev.00/>
>     Summary: Double clicking on the title bar of a java frame supposed
>     to maximise the window which is not happening. Above fix makes
>     corrects that behaviour by listening to double clicks on the title
>     bar and accordingly raising a toggle full screen functionality on
>     the window.
>     Thanks and regards,
>     Shashi

Best regards, Sergey.

More information about the awt-dev mailing list