[9] Review request for 8166897: Some font overlap in the Optionpane dialog.

2016-10-12 Thread Semyon Sadetsky

Hello,

Please review fix for JDK9:

bug: https://bugs.openjdk.java.net/browse/JDK-8166897

webrev: http://cr.openjdk.java.net/~ssadetsky/8166897/webrev.00/

The setResizable() method of XDecoratedPeer class clears the frame 
insets to allow them to receive the updated size. In some situations 
clearing insets during establishing the frame dimensions may break the 
new frame dimensions algorithm for Unity and the frame content 
positioning becomes wrong.


Since in this new algorithm the insets may be arbitrary updated by WM it 
doesn't necessary to clear insets to get them the new size.  The 
proposed solution is to avoid to force frame insets to zero when the 
frame is made resizable or non-resizable by user.


--Semyon



Re: JDK-8098530: ArrayIndexOutOfBoundsException at sun.awt.X11.XEvent.getFieldsAsString

2016-10-12 Thread Sergey Bylokhov

Is it possible to create a test for this issue?

On 12.10.16 19:07, Sergey Malenkov wrote:

Hi all,

Could you please consider the following changes to fix JDK-8098530?

--- src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java
(revision f0ae41314e223bf1b97c8126ac2b0d6edb5ee99d)
+++ src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java
(revision )
@@ -690,7 +690,7 @@
 if (type == AtomicType.TYPE_ATOM) {
 pw.println("\t\tret.append(\"" + name + " = \"
).append( XAtom.get(get_" + name + "()) ).append(\", \");");
 } else if (name.equals("type")) {
-pw.println("\t\tret.append(\"type = \").append(
XlibWrapper.eventToString[get_type()] ).append(\", \");");
+pw.println("\t\tret.append(\"type = \").append(
XlibWrapper.getEventToString(get_type()) ).append(\", \");");
 } else if (name.equals("window")){
 pw.println("\t\tret.append(\"window = \" ).append(
getWindow(get_window()) ).append(\", \");");
 } else if (type == AtomicType.TYPE_ARRAY) {

The sun.awt.X11.XlibWrapper class provides a method, which handles such
errors.
We should not access to array directly.

--
Best regards,
Sergey A. Malenkov



--
Best regards, Sergey.


JDK-8098530: ArrayIndexOutOfBoundsException at sun.awt.X11.XEvent.getFieldsAsString

2016-10-12 Thread Sergey Malenkov
Hi all,

Could you please consider the following changes to fix JDK-8098530?

--- src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java
(revision f0ae41314e223bf1b97c8126ac2b0d6edb5ee99d)
+++ src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java
(revision )
@@ -690,7 +690,7 @@
 if (type == AtomicType.TYPE_ATOM) {
 pw.println("\t\tret.append(\"" + name + " = \"
).append( XAtom.get(get_" + name + "()) ).append(\", \");");
 } else if (name.equals("type")) {
-pw.println("\t\tret.append(\"type = \").append(
XlibWrapper.eventToString[get_type()] ).append(\", \");");
+pw.println("\t\tret.append(\"type = \").append(
XlibWrapper.getEventToString(get_type()) ).append(\", \");");
 } else if (name.equals("window")){
 pw.println("\t\tret.append(\"window = \" ).append(
getWindow(get_window()) ).append(\", \");");
 } else if (type == AtomicType.TYPE_ARRAY) {

The sun.awt.X11.XlibWrapper class provides a method, which handles such
errors.
We should not access to array directly.

-- 
Best regards,
Sergey A. Malenkov


Re: [9] Review request for JDK-8161473:[TEST_BUG] [macosx] add autodelay to java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java

2016-10-12 Thread Sergey Bylokhov

On 12.10.16 9:04, Ambarish Rapte wrote:

Thanks Anubhav,
Changes look fine to me.


+1


*From:*Anubhav Meena
*Sent:* Monday, October 10, 2016 5:06 PM
*To:* Ambarish Rapte
*Cc:* awt-dev@openjdk.java.net
*Subject:* Re:  [9] Review request for
JDK-8161473:[TEST_BUG] [macosx] add autodelay to
java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java



Hi Ambarish,



Have made the changes you suggested. Please find them
here http://cr.openjdk.java.net/~rchamyal/anmeena/8161473/webrev.01/



Thanks,

Anubhav



On Oct 10, 2016, at 2:01 PM, Ambarish Rapte
mailto:ambarish.ra...@oracle.com>> wrote:



Hi Anubhav,



Along with the fix, could you please add below
trivial changes as well,



1.   Add @key headful & @bug 8161473  jtreg tags

2.   Change wild card * import to add specific package imports.

3.   Update copyright with year 2016.





Regards,

Ambarish



*From:* Anubhav Meena
*Sent:* Friday, October 07, 2016 6:46 PM
*To:* awt-dev@openjdk.java.net 
*Subject:*  [9] Review request for
JDK-8161473:[TEST_BUG] [macosx] add autodelay to
java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java



Hi All,



Kindly review the fix for JDK9.



Bug:

_https://bugs.openjdk.java.net/browse/JDK-8161473_



Webrev:

_http://cr.openjdk.java.net/~rchamyal/anmeena/8161473/webrev.00/_



Issue:

[macosx] The test
java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java
often fails, especially on OS X.



Cause:

Lack of minimal delay between elementary robot operations



Fix:

Added wait for idle operation between two robot events.



Regards,

Anubhav






--
Best regards, Sergey.


Re: [9] Review request for JDK-8158380: Regression: java/awt/List/ActionEventTest/ActionEventTest.java

2016-10-12 Thread Sergey Bylokhov

Looks fine.

On 12.10.16 14:40, Manajit Halder wrote:

Thanks you for your comment. Copyright is corrected in both the tests.
Please review the modified webrev.

http://cr.openjdk.java.net/~mhalder/8158380/webrev.02/

Thanks,
Manajit


On 10-Oct-2016, at 5:58 pm, Sergey Bylokhov
mailto:sergey.bylok...@oracle.com>> wrote:

It seems that "Copyright (c)" is incorrectly updated in both tests.

On 10.10.16 14:41, Manajit Halder wrote:

Hi Sergey,

Thank you for the review. Please review the modified webrev.
http://cr.openjdk.java.net/~mhalder/8158380/webrev.01/

Thanks,
Manajit


On 07-Oct-2016, at 7:41 pm, Sergey Bylokhov
mailto:sergey.bylok...@oracle.com>> wrote:

Hi, Manajit.
Instead of adding these methods between operations you can call these
after robot creation:
  Robot.setAutoDelay(int ms)
  Robot.setAutoWaitForIdle(boolean isOn)

On 07.10.16 15:10, Manajit Halder wrote:

Hi All,

Kindly review the fix for JDK9.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8158380

Webrev:
http://cr.openjdk.java.net/~mhalder/8158380/webrev.00/

Issue:
Regression: java/awt/List/ActionEventTest/ActionEventTest.java

Cause:
ActionEvent getModifiers() method was returning wrong value in test
ActionEventTest.java due to wrong modifier value.
Submenu was not activated by menmonic key press in
SubMenuShowTest.java.
In both the cases event queue was not processed completely for robot
keyPress and keyRelease events.

Fix:
In both the cases problem was solved by adding waitForIdle after robot
operations (keyPress and keyRelease).

Regards,
Manajit



--
Best regards, Sergey.





--
Best regards, Sergey.





--
Best regards, Sergey.


Re: [9] Fix for JDK-8166980 : JCK testing of Window.setIconImage() leads to VM crash starting approx from JDK9 b134

2016-10-12 Thread Sergey Bylokhov

Looks fine.

On 12.10.16 10:10, Ajit Ghaisas wrote:

Hi,



Bug :

 https://bugs.openjdk.java.net/browse/JDK-8166980



Issue and Fix :

 Fix for JDK-8147648
 needs to be corrected
a little.

 IconInfo::setScaledSize(int width, int height) method sets
scaledWidth, scaledHeight and rawLength members of IconInfo class.

 In this method rawLength calculation does not consider passed in
width and height – rather it uses class members to calculate the
rawLength. This is incorrect.

The rawLength calculation is corrected as part of this fix.



Webrev :

 http://cr.openjdk.java.net/~aghaisas/8166980/webrev.0/



Request you to review.



Regards,

Ajit




--
Best regards, Sergey.


Re: [9] Review request for JDK-8161473:[TEST_BUG] [macosx] add autodelay to java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java

2016-10-12 Thread Anubhav Meena
Hi Sergey,

Please review the webrev and provide your valuable feedback.

http://cr.openjdk.java.net/~rchamyal/anmeena/8161473/webrev.01/ 


Thanks,
Anubhav

> On Oct 12, 2016, at 11:34 AM, Ambarish Rapte  
> wrote:
> 
> Thanks Anubhav,
> Changes look fine to me.
>  
> Regards,
> Ambarish
>  
> From: Anubhav Meena 
> Sent: Monday, October 10, 2016 5:06 PM
> To: Ambarish Rapte
> Cc: awt-dev@openjdk.java.net
> Subject: Re:  [9] Review request for JDK-8161473:[TEST_BUG] 
> [macosx] add autodelay to 
> java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java
>  
> Hi Ambarish,
>  
> Have made the changes you suggested. Please find them here 
> http://cr.openjdk.java.net/~rchamyal/anmeena/8161473/webrev.01/ 
> 
>  
> Thanks,
> Anubhav
>  
> On Oct 10, 2016, at 2:01 PM, Ambarish Rapte  > wrote:
>  
> Hi Anubhav,
>  
> Along with the fix, could you please add below trivial 
> changes as well,
>  
> 1.   Add @key headful & @bug 8161473  jtreg tags
> 2.   Change wild card * import to add specific package imports.
> 3.   Update copyright with year 2016.
>  
>  
> Regards,
> Ambarish
>  
> From: Anubhav Meena 
> Sent: Friday, October 07, 2016 6:46 PM
> To: awt-dev@openjdk.java.net 
> Subject:  [9] Review request for JDK-8161473:[TEST_BUG] 
> [macosx] add autodelay to 
> java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java
>  
> Hi All,
>  
> Kindly review the fix for JDK9.
>  
> Bug: 
> https://bugs.openjdk.java.net/browse/JDK-8161473 
> 
>  
> Webrev: 
> http://cr.openjdk.java.net/~rchamyal/anmeena/8161473/webrev.00/ 
> 
>  
> Issue: 
> [macosx] The test 
> java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java 
> often fails, especially on OS X.
>  
> Cause: 
> Lack of minimal delay between elementary robot operations
>  
> Fix: 
> Added wait for idle operation between two robot events.
>  
> Regards,
> Anubhav



Re: [9] Review request for JDK-8158380: Regression: java/awt/List/ActionEventTest/ActionEventTest.java

2016-10-12 Thread Manajit Halder
Thanks you for your comment. Copyright is corrected in both the tests. 
Please review the modified webrev.

http://cr.openjdk.java.net/~mhalder/8158380/webrev.02/ 


Thanks,
Manajit

> On 10-Oct-2016, at 5:58 pm, Sergey Bylokhov  
> wrote:
> 
> It seems that "Copyright (c)" is incorrectly updated in both tests.
> 
> On 10.10.16 14:41, Manajit Halder wrote:
>> Hi Sergey,
>> 
>> Thank you for the review. Please review the modified webrev.
>> http://cr.openjdk.java.net/~mhalder/8158380/webrev.01/
>> 
>> Thanks,
>> Manajit
>> 
>>> On 07-Oct-2016, at 7:41 pm, Sergey Bylokhov
>>> mailto:sergey.bylok...@oracle.com>> wrote:
>>> 
>>> Hi, Manajit.
>>> Instead of adding these methods between operations you can call these
>>> after robot creation:
>>>   Robot.setAutoDelay(int ms)
>>>   Robot.setAutoWaitForIdle(boolean isOn)
>>> 
>>> On 07.10.16 15:10, Manajit Halder wrote:
 Hi All,
 
 Kindly review the fix for JDK9.
 
 Bug:
 https://bugs.openjdk.java.net/browse/JDK-8158380
 
 Webrev:
 http://cr.openjdk.java.net/~mhalder/8158380/webrev.00/
 
 Issue:
 Regression: java/awt/List/ActionEventTest/ActionEventTest.java
 
 Cause:
 ActionEvent getModifiers() method was returning wrong value in test
 ActionEventTest.java due to wrong modifier value.
 Submenu was not activated by menmonic key press in SubMenuShowTest.java.
 In both the cases event queue was not processed completely for robot
 keyPress and keyRelease events.
 
 Fix:
 In both the cases problem was solved by adding waitForIdle after robot
 operations (keyPress and keyRelease).
 
 Regards,
 Manajit
>>> 
>>> 
>>> --
>>> Best regards, Sergey.
>> 
> 
> 
> -- 
> Best regards, Sergey.



Re: RFR: 8167523: JDK 9 build failure on MacOS due to unhandled cases in switch statement

2016-10-12 Thread Sergey Malenkov
> Looks fine.
+1

Thanks!
Sergey A. Malenkov


Re: [9] Review request for 8167486: Device.getDisplayMode() doesn't report refresh rate on Linux in case of dual screen

2016-10-12 Thread Semyon Sadetsky

On 10/11/2016 5:02 PM, Sergey Bylokhov wrote:


It seems that this bug is a duplicate of JDK-8159953?

yes, I have closed it.


On 11.10.16 16:40, Sergey Bylokhov wrote:

Should toString() method report zero HZ as unknown(os something like
that) instead of 0? And probably "DEPTH_MULTI"also should be printed in
some way, instead of empty line.

http://cr.openjdk.java.net/~ssadetsky/8167486/webrev.01/


On 11.10.16 16:15, Semyon Sadetsky wrote:

Hello,

Please review fix for JDK9:

bug: https://bugs.openjdk.java.net/browse/JDK-8167486

webrev: http://cr.openjdk.java.net/~ssadetsky/8167486/webrev.00/

In  case Xinerama is on, the current display mode cannot be obtained by
the old xrandr lib calls for secondary screens. The new xrandr API that
supports Xinerama is used for this case in the proposed solution.

--Semyon











[9] Fix for JDK-8166980 : JCK testing of Window.setIconImage() leads to VM crash starting approx from JDK9 b134

2016-10-12 Thread Ajit Ghaisas
Hi,

 

Bug :

 https://bugs.openjdk.java.net/browse/JDK-8166980

 

Issue and Fix :

 Fix for HYPERLINK 
"https://bugs.openjdk.java.net/browse/JDK-8147648"JDK-8147648 needs to be 
corrected a little.

 IconInfo::setScaledSize(int width, int height) method sets scaledWidth, 
scaledHeight and rawLength members of IconInfo class.

 In this method rawLength calculation does not consider passed in width and 
height - rather it uses class members to calculate the rawLength. This is 
incorrect.

The rawLength calculation is corrected as part of this fix.

 

Webrev : 

 http://cr.openjdk.java.net/~aghaisas/8166980/webrev.0/

 

Request you to review.

 

Regards,

Ajit