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

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Shashidhara H V
Hi All, Please review a fix for the below bug:



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
Reply | Threaded
Open this post in threaded view
|

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

Phil Race
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:



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
Reply | Threaded
Open this post in threaded view
|

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

Shashidhara H V

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 <[hidden email]>
Cc: Sergey Bylokhov <[hidden email]>; [hidden email]
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:

 

 

 

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

Reply | Threaded
Open this post in threaded view
|

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

Sergey Bylokhov
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 <[hidden email]>
> *Cc:* Sergey Bylokhov <[hidden email]>; [hidden email]
> *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.
Reply | Threaded
Open this post in threaded view
|

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

Shashidhara H V
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,
Shashi

-----Original Message-----
From: Sergey Bylokhov
Sent: Tuesday, November 14, 2017 3:28 AM
To: Shashidhara Veerabhadraiah <[hidden email]>; Philip Race <[hidden email]>; [hidden email]
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
> <[hidden email]>
> *Cc:* Sergey Bylokhov <[hidden email]>;
> [hidden email]
> *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.
Reply | Threaded
Open this post in threaded view
|

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

Sergey Bylokhov
On 20/11/2017 23:19, Shashidhara Veerabhadraiah wrote:
> 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.

We need to understand why it was changed, probably it was a fix for some
bug and we should check that we will not reintroduce it.

>
> 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,
> Shashi
>
> -----Original Message-----
> From: Sergey Bylokhov
> Sent: Tuesday, November 14, 2017 3:28 AM
> To: Shashidhara Veerabhadraiah <[hidden email]>; Philip Race <[hidden email]>; [hidden email]
> 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
>> <[hidden email]>
>> *Cc:* Sergey Bylokhov <[hidden email]>;
>> [hidden email]
>> *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.
>


--
Best regards, Sergey.
Reply | Threaded
Open this post in threaded view
|

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

Shashidhara H V
Hi Sergey, In order to not to cause regression I ran the test that caused this change earlier under the bug: https://bugs.openjdk.java.net/browse/JDK-8032595

The test is http://hg.openjdk.java.net/jdk10/sandbox/jdk/file/79bd216ab4d4/test/java/awt/Frame/SlideNotResizableTest/SlideNotResizableTest.java that was written to address this earlier bug and I have ran this test under jtreg and found the test being passed.

Thanks and regards,
Shashi

-----Original Message-----
From: Sergey Bylokhov
Sent: Wednesday, November 22, 2017 4:36 AM
To: Shashidhara Veerabhadraiah <[hidden email]>; Philip Race <[hidden email]>; [hidden email]
Subject: Re: <AWT Dev> [10] JDK-8190192: Double click on the title bar no longer repositions the window

On 20/11/2017 23:19, Shashidhara Veerabhadraiah wrote:
> 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.

We need to understand why it was changed, probably it was a fix for some bug and we should check that we will not reintroduce it.

>
> 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,
> Shashi
>
> -----Original Message-----
> From: Sergey Bylokhov
> Sent: Tuesday, November 14, 2017 3:28 AM
> To: Shashidhara Veerabhadraiah
> <[hidden email]>; Philip Race
> <[hidden email]>; [hidden email]
> 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
>> <[hidden email]>
>> *Cc:* Sergey Bylokhov <[hidden email]>;
>> [hidden email]
>> *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.
>


--
Best regards, Sergey.