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

classic Classic list List threaded Threaded
14 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

Philip 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.
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.
There are a few tests which fails after this fix:
fail   ---    java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java
fail   ---    java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java
fail   ---    javax/swing/reliability/TaskZoomJFrameRepaint.java

Please check them.


On 23/11/2017 22:09, Shashidhara Veerabhadraiah wrote:

> 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.
>


--
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
Thanks for this information Sergey.

Will check out these issues and update back.

Thanks and regards,
Shashi

> On 06-Dec-2017, at 11:48 PM, Sergey Bylokhov <[hidden email]> wrote:
>
> Hi, Shashi.
> There are a few tests which fails after this fix:
> fail   ---    java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java
> fail   ---    java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java
> fail   ---    javax/swing/reliability/TaskZoomJFrameRepaint.java
>
> Please check them.
>
>
> On 23/11/2017 22:09, Shashidhara Veerabhadraiah wrote:
>> 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.
>
>
> --
> 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, Here is the new web rev:


Now all these below tests passes:
java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java
java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java
javax/swing/reliability/TaskZoomJFrameRepaint.java
java/awt/Frame/SlideNotResizableTest/SlideNotResizableTest.java

windowShouldZoom is an optional function that can be delegated. Earlier by implementing this delegation we were tapping that event. This function did not do any customization when compared to the default behaviour hence this may not be required to be delegated. The web rev now  contains a test for this bug and also ran the above additional tests to prove to not to cause regression.

Thanks and regards,
Shashi

On 06-Dec-2017, at 11:56 PM, shashidhara veerabhadraiah <[hidden email]> wrote:

Thanks for this information Sergey.

Will check out these issues and update back.

Thanks and regards,
Shashi

On 06-Dec-2017, at 11:48 PM, Sergey Bylokhov <[hidden email]> wrote:

Hi, Shashi.
There are a few tests which fails after this fix:
fail   ---    java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java
fail   ---    java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java
fail   ---    javax/swing/reliability/TaskZoomJFrameRepaint.java

Please check them.


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


--
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
Hi, Shashi.
On 06/12/2017 22:06, shashidhara veerabhadraiah wrote:
> The web rev now  contains a test for this bug and also ran the above additional
> tests to prove to not to cause regression.

It seems that the test is passed before the fix, but it should not.
Also note that the frame should be disposed at the end of the test, and
the swing components should be accessed on
EDT(frame.getLocationOnScreen()).@author tag is not used in our
testbase, we tries to drop them when we update an existing tests.

>
> Thanks and regards,
> Shashi
>
>> On 06-Dec-2017, at 11:56 PM, shashidhara veerabhadraiah
>> <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Thanks for this information Sergey.
>>
>> Will check out these issues and update back.
>>
>> Thanks and regards,
>> Shashi
>>
>>> On 06-Dec-2017, at 11:48 PM, Sergey Bylokhov
>>> <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>> Hi, Shashi.
>>> There are a few tests which fails after this fix:
>>> fail   ---
>>>    java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java
>>> fail   ---    java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java
>>> fail   ---    javax/swing/reliability/TaskZoomJFrameRepaint.java
>>>
>>> Please check them.
>>>
>>>
>>> On 23/11/2017 22:09, Shashidhara Veerabhadraiah wrote:
>>>> 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]
>>>> <mailto:[hidden email]>>; Philip Race
>>>> <[hidden email] <mailto:[hidden email]>>;
>>>> [hidden email] <mailto:[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]
>>>>> <mailto:[hidden email]>>; Philip Race
>>>>> <[hidden email] <mailto:[hidden email]>>;
>>>>> [hidden email] <mailto:[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.
>>>
>>>
>>> --
>>> 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, Here is the new Webrev for the comments:

http://cr.openjdk.java.net/~sveerabhadra/8190192/webrev.03/

Thanks and regards,
Shashi

-----Original Message-----
From: Sergey Bylokhov
Sent: Tuesday, December 12, 2017 7:02 AM
To: shashidhara veerabhadraiah <[hidden email]>
Cc: 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.
On 06/12/2017 22:06, shashidhara veerabhadraiah wrote:
> The web rev now  contains a test for this bug and also ran the above
> additional tests to prove to not to cause regression.

It seems that the test is passed before the fix, but it should not.
Also note that the frame should be disposed at the end of the test, and the swing components should be accessed on EDT(frame.getLocationOnScreen()).@author tag is not used in our testbase, we tries to drop them when we update an existing tests.

>
> Thanks and regards,
> Shashi
>
>> On 06-Dec-2017, at 11:56 PM, shashidhara veerabhadraiah
>> <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Thanks for this information Sergey.
>>
>> Will check out these issues and update back.
>>
>> Thanks and regards,
>> Shashi
>>
>>> On 06-Dec-2017, at 11:48 PM, Sergey Bylokhov
>>> <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>> Hi, Shashi.
>>> There are a few tests which fails after this fix:
>>> fail   ---
>>>    java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java
>>> fail   ---    java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java
>>> fail   ---    javax/swing/reliability/TaskZoomJFrameRepaint.java
>>>
>>> Please check them.
>>>
>>>
>>> On 23/11/2017 22:09, Shashidhara Veerabhadraiah wrote:
>>>> 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]
>>>> <mailto:[hidden email]>>; Philip Race
>>>> <[hidden email] <mailto:[hidden email]>>;
>>>> [hidden email] <mailto:[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]
>>>>> <mailto:[hidden email]>>; Philip Race
>>>>> <[hidden email] <mailto:[hidden email]>>;
>>>>> [hidden email] <mailto:[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.
>>>
>>>
>>> --
>>> 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

Sergey Bylokhov
Looks fine.

On 12/12/2017 01:29, Shashidhara Veerabhadraiah wrote:

> Hi Sergey, Here is the new Webrev for the comments:
>
> http://cr.openjdk.java.net/~sveerabhadra/8190192/webrev.03/
>
> Thanks and regards,
> Shashi
>
> -----Original Message-----
> From: Sergey Bylokhov
> Sent: Tuesday, December 12, 2017 7:02 AM
> To: shashidhara veerabhadraiah <[hidden email]>
> Cc: 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.
> On 06/12/2017 22:06, shashidhara veerabhadraiah wrote:
>> The web rev now  contains a test for this bug and also ran the above
>> additional tests to prove to not to cause regression.
>
> It seems that the test is passed before the fix, but it should not.
> Also note that the frame should be disposed at the end of the test, and the swing components should be accessed on EDT(frame.getLocationOnScreen()).@author tag is not used in our testbase, we tries to drop them when we update an existing tests.
>
>>
>> Thanks and regards,
>> Shashi
>>
>>> On 06-Dec-2017, at 11:56 PM, shashidhara veerabhadraiah
>>> <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>> Thanks for this information Sergey.
>>>
>>> Will check out these issues and update back.
>>>
>>> Thanks and regards,
>>> Shashi
>>>
>>>> On 06-Dec-2017, at 11:48 PM, Sergey Bylokhov
>>>> <[hidden email] <mailto:[hidden email]>> wrote:
>>>>
>>>> Hi, Shashi.
>>>> There are a few tests which fails after this fix:
>>>> fail   ---
>>>>     java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java
>>>> fail   ---    java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java
>>>> fail   ---    javax/swing/reliability/TaskZoomJFrameRepaint.java
>>>>
>>>> Please check them.
>>>>
>>>>
>>>> On 23/11/2017 22:09, Shashidhara Veerabhadraiah wrote:
>>>>> 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]
>>>>> <mailto:[hidden email]>>; Philip Race
>>>>> <[hidden email] <mailto:[hidden email]>>;
>>>>> [hidden email] <mailto:[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]
>>>>>> <mailto:[hidden email]>>; Philip Race
>>>>>> <[hidden email] <mailto:[hidden email]>>;
>>>>>> [hidden email] <mailto:[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.
>>>>
>>>>
>>>> --
>>>> 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
Thank you Sergey.

Thanks and regards,
Shashi

> On 16-Dec-2017, at 12:04 AM, Sergey Bylokhov <[hidden email]> wrote:
>
> Looks fine.
>
> On 12/12/2017 01:29, Shashidhara Veerabhadraiah wrote:
>> Hi Sergey, Here is the new Webrev for the comments:
>> http://cr.openjdk.java.net/~sveerabhadra/8190192/webrev.03/
>> Thanks and regards,
>> Shashi
>> -----Original Message-----
>> From: Sergey Bylokhov
>> Sent: Tuesday, December 12, 2017 7:02 AM
>> To: shashidhara veerabhadraiah <[hidden email]>
>> Cc: 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.
>> On 06/12/2017 22:06, shashidhara veerabhadraiah wrote:
>>> The web rev now  contains a test for this bug and also ran the above
>>> additional tests to prove to not to cause regression.
>> It seems that the test is passed before the fix, but it should not.
>> Also note that the frame should be disposed at the end of the test, and the swing components should be accessed on EDT(frame.getLocationOnScreen()).@author tag is not used in our testbase, we tries to drop them when we update an existing tests.
>>>
>>> Thanks and regards,
>>> Shashi
>>>
>>>> On 06-Dec-2017, at 11:56 PM, shashidhara veerabhadraiah
>>>> <[hidden email]
>>>> <mailto:[hidden email]>> wrote:
>>>>
>>>> Thanks for this information Sergey.
>>>>
>>>> Will check out these issues and update back.
>>>>
>>>> Thanks and regards,
>>>> Shashi
>>>>
>>>>> On 06-Dec-2017, at 11:48 PM, Sergey Bylokhov
>>>>> <[hidden email] <mailto:[hidden email]>> wrote:
>>>>>
>>>>> Hi, Shashi.
>>>>> There are a few tests which fails after this fix:
>>>>> fail   ---
>>>>>    java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java
>>>>> fail   ---    java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java
>>>>> fail   ---    javax/swing/reliability/TaskZoomJFrameRepaint.java
>>>>>
>>>>> Please check them.
>>>>>
>>>>>
>>>>> On 23/11/2017 22:09, Shashidhara Veerabhadraiah wrote:
>>>>>> 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]
>>>>>> <mailto:[hidden email]>>; Philip Race
>>>>>> <[hidden email] <mailto:[hidden email]>>;
>>>>>> [hidden email] <mailto:[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]
>>>>>>> <mailto:[hidden email]>>; Philip Race
>>>>>>> <[hidden email] <mailto:[hidden email]>>;
>>>>>>> [hidden email] <mailto:[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.
>>>>>
>>>>>
>>>>> --
>>>>> Best regards, Sergey.
>>>>
>>>
>
>
> --
> Best regards, Sergey.