RFR: 8256465: [macos11] Java frame and dialog presented full screen freeze application

2021-04-08 Thread Tejpal Rebari
Hi All,
Please review the following fix for jdk17.

Issue : On MacOS 11 Java Frame and JDialog application is freezing  in Full 
Screen  when the System Preference -> General -> Prefer Tabs is set to "Full 
Screen". It is also freezing in normal screen when Prefer Tabs is set to 
"Always".
It doesn't freeze when the Prefer tabs is set to "never".

Fix : The default value of allowsAutomaticWindowTabbing is 0/NO in MacOS prior 
to bigSur(11)  
(in the AWTWindow.m file),  so the issue is not seen in mac os 10.13 10.14 and 
10.15.
>From MacOS 11 onwards  this value is set to 1/YES and the issue is seen.
This issue can also be reproduced in MacOS 10.15 by setting 
setAllowsAutomaticWindowTabbing to true in the AWTWindow.m file.

Fix is to set allowsAutomaticWindowTabbing to No for all the MacOS release 
staring from 10.12.
The allowsAutomaticTabbing was introduced in MacOS 10.12 but the default value 
changed in macos11.

Test : Added a manual test and tested on MacOS 10.15 and 11.
All the internal tests run are green.

-

Commit messages:
 - initial fix and test

Changes: https://git.openjdk.java.net/jdk/pull/3407/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=3407=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256465
  Stats: 138 lines in 2 files changed: 138 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3407.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3407/head:pull/3407

PR: https://git.openjdk.java.net/jdk/pull/3407


Re: RFR: 8080185: [TESTBUG] Test instructions need to be updated for test java/awt/dnd/DnDFileGroupDescriptor/DnDFileGroupDescriptor

2021-04-08 Thread Alexander Zuev
On Fri, 9 Apr 2021 04:55:18 GMT, Prasanta Sadhukhan  
wrote:

> This testcase was a regression testcase for a windows bug JDK-6242241 whereby 
> dragging an attachment from a Microsoft Outlook message to the application 
> results in blank or semicolons.
> The testcase was later made applicable to windows only by JDK-7147083 
> http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/d8efcad28072
> so we can remove the test from Problemlist which is problemlisted for linux 
> and mac.

Marked as reviewed by kizune (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/3406


RFR: 8080185: [TESTBUG] Test instructions need to be updated for test java/awt/dnd/DnDFileGroupDescriptor/DnDFileGroupDescriptor

2021-04-08 Thread Prasanta Sadhukhan
This testcase was a regression testcase for a windows bug JDK-6242241 whereby 
dragging an attachment from a Microsoft Outlook message to the application 
results in blank or semicolons.
The testcase was later made applicable to windows only by JDK-7147083 
http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/d8efcad28072
so we can remove the test from Problemlist which is problemlisted for linux and 
mac.

-

Commit messages:
 - 8080185: [TESTBUG] Test instructions need to be updated for test 
java/awt/dnd/DnDFileGroupDescriptor/DnDFileGroupDescriptor

Changes: https://git.openjdk.java.net/jdk/pull/3406/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=3406=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8080185
  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3406.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3406/head:pull/3406

PR: https://git.openjdk.java.net/jdk/pull/3406


Re: RFR: 8258788: incorrect response to change in window insets [lanai]

2021-04-08 Thread Sergey Bylokhov
On Wed, 7 Apr 2021 23:04:04 GMT, Alexey Ushakov  wrote:

> Perform replaceSurfaceData on insets change

src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java line 741:

> 739: if (CGraphicsDevice.usingMetalPipeline() && invalid) {
> 740: replaceSurfaceData();
> 741: }

I think fix can be moved to the 729 line "if (pResized || isNewDevice || 
invalid)". Looks like it is a bug even in the OGL case, if "pResized == false" 
and window is not resized but in the insets were changed we should update the 
surface.

BTW I think the updateMinimumSize() should be called as well since the 
minimum/maximum size depends on the insets and NSWindow frame/contentRect.

-

PR: https://git.openjdk.java.net/jdk/pull/3390


Integrated: 8264428: Cleanup usages of StringBuffer in java.desktop

2021-04-08 Thread Andrey Turbanov
On Mon, 29 Mar 2021 20:50:14 GMT, Andrey Turbanov 
 wrote:

> There are few possible cleanups in java.desktop related to legacy 
> StringBuffer usages:
> 1. In few places StringBuffer can be replaced with plain String concatenation.
> 2. StringBuffer can be replaced with StringBuilder. StringBuilder has better 
> performance as it is not thread-safe.
> 3. There are few places where result of string concatenation is passed to 
> StringBuffer.append method. Using separate `.append` calls is more clear.
> 4. In few places primitives are unnecessary converted to String before 
> `.append` call. They can be replaced with specialized methods (like 
> `.append(int)` calls.

This pull request has now been integrated.

Changeset: 8a235807
Author:Andrey Turbanov 
Committer: Alexander Zvegintsev 
URL:   https://git.openjdk.java.net/jdk/commit/8a235807
Stats: 48 lines in 11 files changed: 3 ins; 8 del; 37 mod

8264428: Cleanup usages of StringBuffer in java.desktop

Reviewed-by: azvegint, aivanov

-

PR: https://git.openjdk.java.net/jdk/pull/3251


Re: RFR: 8264428: Cleanup usages of StringBuffer in java.desktop [v4]

2021-04-08 Thread Alexander Zvegintsev
On Thu, 8 Apr 2021 14:43:50 GMT, Andrey Turbanov 
 wrote:

>> There are few possible cleanups in java.desktop related to legacy 
>> StringBuffer usages:
>> 1. In few places StringBuffer can be replaced with plain String 
>> concatenation.
>> 2. StringBuffer can be replaced with StringBuilder. StringBuilder has better 
>> performance as it is not thread-safe.
>> 3. There are few places where result of string concatenation is passed to 
>> StringBuffer.append method. Using separate `.append` calls is more clear.
>> 4. In few places primitives are unnecessary converted to String before 
>> `.append` call. They can be replaced with specialized methods (like 
>> `.append(int)` calls.
>
> Andrey Turbanov has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8264484: Replace uses of StringBuffer with StringBuilder in 
> jdk.hotspot.agent
>   
>   place each 'append' call on its own line

Marked as reviewed by azvegint (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/3251


Re: RFR: 8258788: incorrect response to change in window insets [lanai]

2021-04-08 Thread Alexey Ushakov
On Wed, 7 Apr 2021 20:29:12 GMT, Alexey Ushakov  wrote:

>>> @avu Test passes without fix also.
>> @jayathirthrao Could you provide the details about your configuration along 
>> with parameters passed to jtreg ?
>
>> @avu I am running test in 13 inch Macbook Early 2015 with integrated Intel 
>> Iris Graphics 6100.
>> jtreg command i am using "jtreg -jdk: -Dsun.java2d.metal=true 
>> "
> @jayathirthrao  I'm not sure that -Dsun.java2d.metal had been passed to the 
> test JVM. I rechecked with slightly different command line and the test fails 
> without the fix
> jtreg -ignore:quiet -v -a -xml -vmoptions:"-Dsun.java2d.metal=True "  
> -testjdk:path_to_jdk path_to_test

I've created a simpler solution within another pull request. Please, have a 
look https://git.openjdk.java.net/jdk/pull/3390

-

PR: https://git.openjdk.java.net/jdk/pull/3308


Re: RFR: 8264428: Cleanup usages of StringBuffer in java.desktop [v4]

2021-04-08 Thread Alexey Ivanov
On Thu, 8 Apr 2021 14:43:50 GMT, Andrey Turbanov 
 wrote:

>> There are few possible cleanups in java.desktop related to legacy 
>> StringBuffer usages:
>> 1. In few places StringBuffer can be replaced with plain String 
>> concatenation.
>> 2. StringBuffer can be replaced with StringBuilder. StringBuilder has better 
>> performance as it is not thread-safe.
>> 3. There are few places where result of string concatenation is passed to 
>> StringBuffer.append method. Using separate `.append` calls is more clear.
>> 4. In few places primitives are unnecessary converted to String before 
>> `.append` call. They can be replaced with specialized methods (like 
>> `.append(int)` calls.
>
> Andrey Turbanov has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8264484: Replace uses of StringBuffer with StringBuilder in 
> jdk.hotspot.agent
>   
>   place each 'append' call on its own line

Marked as reviewed by aivanov (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/3251


Re: RFR: 8264428: Cleanup usages of StringBuffer in java.desktop [v4]

2021-04-08 Thread Andrey Turbanov
> There are few possible cleanups in java.desktop related to legacy 
> StringBuffer usages:
> 1. In few places StringBuffer can be replaced with plain String concatenation.
> 2. StringBuffer can be replaced with StringBuilder. StringBuilder has better 
> performance as it is not thread-safe.
> 3. There are few places where result of string concatenation is passed to 
> StringBuffer.append method. Using separate `.append` calls is more clear.
> 4. In few places primitives are unnecessary converted to String before 
> `.append` call. They can be replaced with specialized methods (like 
> `.append(int)` calls.

Andrey Turbanov has updated the pull request incrementally with one additional 
commit since the last revision:

  8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent
  
  place each 'append' call on its own line

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3251/files
  - new: https://git.openjdk.java.net/jdk/pull/3251/files/963dc56e..d083f953

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=3251=03
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=3251=02-03

  Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3251.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3251/head:pull/3251

PR: https://git.openjdk.java.net/jdk/pull/3251


Re: RFR: 8264428: Cleanup usages of StringBuffer in java.desktop [v3]

2021-04-08 Thread Andrey Turbanov
On Wed, 7 Apr 2021 15:21:40 GMT, Alexey Ivanov  wrote:

>> Andrey Turbanov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   [PATCH] Replace uses of StringBuffer with StringBuilder in java.desktop
>>   
>>   fix copyright year
>
> src/java.desktop/unix/classes/sun/awt/X11/XCreateWindowParams.java line 88:
> 
>> 86: while (eIter.hasNext()) {
>> 87: Map.Entry entry = eIter.next();
>> 88: buf.append(entry.getKey()).append(": 
>> ").append(entry.getValue()).append("\n");
> 
> Would it be clearer if each append was on its own line?
> Suggestion:
> 
> buf.append(entry.getKey())
>.append(": ")
>.append(entry.getValue())
>.append("\n");

done

-

PR: https://git.openjdk.java.net/jdk/pull/3251


Re: RFR: 8263363: Minor cleanup of Lanai code - unused code removal and comments correction [v3]

2021-04-08 Thread Ajit Ghaisas
> Refer JBS for 3 issues that this PR addresses.
> In addition, I have corrected an erroneous free() call in the same method I 
> was cleaning up.

Ajit Ghaisas has updated the pull request incrementally with one additional 
commit since the last revision:

  log message correction

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3357/files
  - new: https://git.openjdk.java.net/jdk/pull/3357/files/36ed087b..45e7aec0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=3357=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=3357=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3357.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3357/head:pull/3357

PR: https://git.openjdk.java.net/jdk/pull/3357


Re: RFR: 8263363: Minor cleanup of Lanai code - unused code removal and comments correction [v2]

2021-04-08 Thread Ajit Ghaisas
> Refer JBS for 3 issues that this PR addresses.
> In addition, I have corrected an erroneous free() call in the same method I 
> was cleaning up.

Ajit Ghaisas has updated the pull request incrementally with one additional 
commit since the last revision:

  Review fixes

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3357/files
  - new: https://git.openjdk.java.net/jdk/pull/3357/files/ade2381d..36ed087b

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=3357=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=3357=00-01

  Stats: 128 lines in 1 file changed: 20 ins; 81 del; 27 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3357.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3357/head:pull/3357

PR: https://git.openjdk.java.net/jdk/pull/3357


Re: RFR: 8262981: Create implementation for NSAccessibilitySlider protocol [v3]

2021-04-08 Thread Alexander Zuev
On Thu, 1 Apr 2021 12:12:40 GMT, Pankaj Bansal  wrote:

>> Create implementation of NSAccessibilitySlider protocol 
>> https://developer.apple.com/documentation/appkit/nsaccessibilityslider
>> 
>> The implementation has the function performIncrement and performDecrement to 
>> increase/decrease the value of slider using the VoiceOver. To implement this 
>> functionality, I could think of  following two ways. I have chosen the first 
>> one here though it is more intrusive.
>> 1. Make the AccessibleJSlider class implement the AccessibleAction 
>> interface. This makes AccessibleJSlider consistent with the 
>> AccessibleJSpinner class. It is more clear and the logic to 
>> increase/decrease Slider value can be changed easily. But this changes 
>> AccessibleJSlider class and will need a CSR.
>> 2. Get the current Accessible Value from the component and  just 
>> increment/decrement it in SliderAccessibility.m  class itself and then set 
>> the current accessible value fro there only. This will not need any changes 
>> in AccessibleJSlider class, but this does not look correct way and I have 
>> not used this.
>> 
>> The changes can be easily tested by using a JSlider example, like the 
>> following example. VO should announce the correct the slider values. To 
>> change the slider values, use ctrl+opt+shift+down key to start interacting 
>> with the slider, then use ctrl+opt+up/down arrow keys to increment/decrement 
>> slider values.
>> 
>>   import javax.swing.JFrame;
>>   import javax.swing.JSlider;
>>   
>>   public class JSliderDemo{
>>   public static void main(String[] args) throws Exception {
>>   JFrame jframe = new JFrame("JSlider Demo");
>>   jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>>   jframe.add(new JSlider());
>>   
>>   jframe.setLocationRelativeTo(null);
>>   jframe.pack();
>>   jframe.setVisible(true);
>>   }
>>   }
>
> Pankaj Bansal has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains seven commits:
> 
>  - Merge branch 'master' into JDK-8262981
>  - increase initial capacity for rolesMap
>  - Remove whitespaces
>  - remove SpinboxAccessibility.m changes
>  - Code cleanup
>  - cleanup
>  - 8262981: Create implementation for NSAccessibilitySlider protocol

Marked as reviewed by kizune (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/2874