Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-04-25 Thread Semyon Sadetsky
Hello, The issues https://bugs.openjdk.java.net/browse/JDK-8154992 https://bugs.openjdk.java.net/browse/JDK-8154993 https://bugs.openjdk.java.net/browse/JDK-8154994 were filed. So ready to push then... --Semyon On 4/22/2016 10:41 PM, Phil Race wrote: Hi Semyon, I think we can/should quickl

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-04-22 Thread Phil Race
Hi Semyon, I think we can/should quickly fix the new ordinal() usage and file a separate bug for the GTKEngine usage. We can table (defer) changes for the potential hang as long as we file a JIRA to investigate. Then we can get the JEP in sooner rather than later (Monday!) -phil. On 04/1

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-04-11 Thread Semyon Sadetsky
Sergey, I yet do not understand your arguments unless the synchronization issue (it took place before the current fix and it is better to investigate it separately). But I think this topic is important and shouldn't be lost. I would suggest you to file a JIRA ticket with description of bad sce

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-04-11 Thread Semyon Sadetsky
Please review the new update: http://cr.openjdk.java.net/~ssadetsky/8145547/webrev.06/ The changes applied: gtk_interface.c: Algorithm to detect already loaded GTK library is changed to search the library name in /proc/self/map file data. Thus the library detection is improved for the case when

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-04-08 Thread Semyon Sadetsky
The fix was updated to take into account defects discovered by parfait: (*env)->ExceptionCheck(env); is removed from the gtk3_get_drawable_data() in gtk2_interface.c and gtk3_interface.c because GetPrimitiveArrayCritical()/ ReleasePrimitiveArrayCritical() do not throw exceptions. xx and yy v

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-04-08 Thread Sergey Bylokhov
On 21.03.16 23:38, Semyon Sadetsky wrote: This does not solve the problem when check/init/load will try to use the different versions. I guess I provided enough arguments to initialize these data only once. I've already explained that GTK library cannot be loaded twice, only one version may be l

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-04-06 Thread Alexander Scherbatiy
The fix looks good to me. Thanks, Alexandr. On 4/5/2016 8:04 PM, Semyon Sadetsky wrote: The fix is updated because JEP 272 was pushed. JEP 272 has dependency on GTK. http://cr.openjdk.java.net/~ssadetsky/8145547/webrev.04/ --Semyon On 3/18/2016 4:02 PM, Semyon Sadetsky wrote: On 3

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-04-05 Thread Phil Race
I see. I looked through the newly changed files and it seems fine although I don't have time to re-apply the updated patch. -phil. On 04/05/2016 11:16 AM, Semyon Sadetsky wrote: XTaskbarPeer.java, awt_Taskbar.c and awt_Taskbar.h were changed to use the new common gtk_interface. Glib calls whi

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-04-05 Thread Semyon Sadetsky
XTaskbarPeer.java, awt_Taskbar.c and awt_Taskbar.h were changed to use the new common gtk_interface. Glib calls which are necessary for the taskbar module are added to gtk_interface: g_object_unref(), g_list_append(), g_list_free(), g_list_free_full(). --Semyon On 4/5/2016 8:54 PM, Phil R

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-04-05 Thread Phil Race
Could you point me to what was updated ? -phil. On 04/05/2016 10:04 AM, Semyon Sadetsky wrote: The fix is updated because JEP 272 was pushed. JEP 272 has dependency on GTK. http://cr.openjdk.java.net/~ssadetsky/8145547/webrev.04/ --Semyon On 3/18/2016 4:02 PM, Semyon Sadetsky wrote: On 3

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-04-05 Thread Semyon Sadetsky
The fix is updated because JEP 272 was pushed. JEP 272 has dependency on GTK. http://cr.openjdk.java.net/~ssadetsky/8145547/webrev.04/ --Semyon On 3/18/2016 4:02 PM, Semyon Sadetsky wrote: On 3/17/2016 10:57 PM, Phil Race wrote: I ran your changes (which included my fix) through jprt and al

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-21 Thread Semyon Sadetsky
On 3/21/2016 10:56 PM, Sergey Bylokhov wrote: On 21.03.16 22:30, Semyon Sadetsky wrote: On 3/21/2016 10:20 PM, Sergey Bylokhov wrote: On 21.03.16 22:00, Semyon Sadetsky wrote: But for example getEnabledGtkVersion() is called in the XDesktopPeer.java also. Note that XDesktopPeer and UnixToo

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-21 Thread Sergey Bylokhov
On 21.03.16 22:30, Semyon Sadetsky wrote: On 3/21/2016 10:20 PM, Sergey Bylokhov wrote: On 21.03.16 22:00, Semyon Sadetsky wrote: But for example getEnabledGtkVersion() is called in the XDesktopPeer.java also. Note that XDesktopPeer and UnixToolkit synchronized differently but but tries to in

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-21 Thread Semyon Sadetsky
On 3/21/2016 10:20 PM, Sergey Bylokhov wrote: On 21.03.16 22:00, Semyon Sadetsky wrote: But for example getEnabledGtkVersion() is called in the XDesktopPeer.java also. Note that XDesktopPeer and UnixToolkit synchronized differently but but tries to init gtk. It will be safer to remove this pos

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-21 Thread Sergey Bylokhov
On 21.03.16 22:00, Semyon Sadetsky wrote: But for example getEnabledGtkVersion() is called in the XDesktopPeer.java also. Note that XDesktopPeer and UnixToolkit synchronized differently but but tries to init gtk. It will be safer to remove this possible missconfiguration. XDesktopPeer loads GTK

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-21 Thread Semyon Sadetsky
On 3/21/2016 4:52 PM, Sergey Bylokhov wrote: On 21.03.16 16:26, Semyon Sadetsky wrote: On 3/19/2016 6:49 PM, Sergey Bylokhov wrote: On 18.03.16 15:37, Semyon Sadetsky wrote: On 3/17/2016 2:46 PM, Sergey Bylokhov wrote: Small notes: - It will be good to move the code which reads the syste

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-21 Thread Sergey Bylokhov
On 21.03.16 16:26, Semyon Sadetsky wrote: On 3/19/2016 6:49 PM, Sergey Bylokhov wrote: On 18.03.16 15:37, Semyon Sadetsky wrote: On 3/17/2016 2:46 PM, Sergey Bylokhov wrote: Small notes: - It will be good to move the code which reads the system properties to the static init block, otherwise

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-21 Thread Semyon Sadetsky
On 3/19/2016 6:49 PM, Sergey Bylokhov wrote: On 18.03.16 15:37, Semyon Sadetsky wrote: On 3/17/2016 2:46 PM, Sergey Bylokhov wrote: Small notes: - It will be good to move the code which reads the system properties to the static init block, otherwise we can be in trouble if these properties w

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-20 Thread Semyon Sadetsky
Hi Phil, Thank for review. You will find my reply below in the text. The updated webrev is http://cr.openjdk.java.net/~ssadetsky/8145547/webrev.01/ It also contains: - new properties jdk.gtk.version and jdk.gtk.verbose - appearance tuning for Ubuntu 15 (GTK 3.14). It may require more but we c

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-19 Thread Phil Race
I ran your changes (which included my fix) through jprt and all Solaris platforms failed as follows :- jdk/src/java.desktop/unix/native/libawt_xawt/awt/sun_awt_X11_GtkFileDialogPeer.c", line 37: error: typedef redeclared: GtkWindow (E_TYPEDEF_REDECLARED) cc: acomp failed for jdk/src/java.deskt

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-19 Thread Victor D'yakov
On 17.03.2016 6:25, Semyon Sadetsky wrote: The awt_Desktop.c is missed in the webrev. Please see the updated one: http://cr.openjdk.java.net/~ssadetsky/8145547/webrev.02/ --Semyon On 3/17/2016 3:57 PM, Sergey Bylokhov wrote: On 16.03.16 20:52, Semyon Sadetsky wrote: Hi Phil, Thank for re

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-19 Thread Sergey Bylokhov
On 18.03.16 15:37, Semyon Sadetsky wrote: On 3/17/2016 2:46 PM, Sergey Bylokhov wrote: Small notes: - It will be good to move the code which reads the system properties to the static init block, otherwise we can be in trouble if these properties will be changed at runtime. I don't' see any tro

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-19 Thread Phil Race
This all sounds reasonable so I am OK with the changes. -phil. On 03/16/2016 10:52 AM, Semyon Sadetsky wrote: Hi Phil, Thank for review. You will find my reply below in the text. The updated webrev is http://cr.openjdk.java.net/~ssadetsky/8145547/webrev.01/ It also contains: - new propertie

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-19 Thread Semyon Sadetsky
On 3/17/2016 10:57 PM, Phil Race wrote: I ran your changes (which included my fix) through jprt and all Solaris platforms failed as follows :- jdk/src/java.desktop/unix/native/libawt_xawt/awt/sun_awt_X11_GtkFileDialogPeer.c", line 37: error: typedef redeclared: GtkWindow (E_TYPEDEF_REDECLARE

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-19 Thread Sergey Bylokhov
On 16.03.16 20:52, Semyon Sadetsky wrote: Hi Phil, Thank for review. You will find my reply below in the text. The updated webrev is http://cr.openjdk.java.net/~ssadetsky/8145547/webrev.01/ On my system this version fails to build(Ubuntu 15.10 + gcc 5.2.1): ERROR: Build failed for target 'im

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-19 Thread Phil Race
This reminded me I had not yet tried the build myself. When I did I not get the error that Sergey did but I got this as well :- jdk9-client/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c: In function ‘get_integer_property’: jdk9-client/jdk/src/java.desktop/unix/native/libawt_x

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-18 Thread Sergey Bylokhov
Small notes: - It will be good to move the code which reads the system properties to the static init block, otherwise we can be in trouble if these properties will be changed at runtime. - Is it necessary to use ordinal? can we replace it with some specific data?(the same for the indexed acce

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-18 Thread Semyon Sadetsky
On 3/17/2016 2:46 PM, Sergey Bylokhov wrote: Small notes: - It will be good to move the code which reads the system properties to the static init block, otherwise we can be in trouble if these properties will be changed at runtime. I don't' see any troubles with this. Can you describe the sc

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-18 Thread Semyon Sadetsky
The awt_Desktop.c is missed in the webrev. Please see the updated one: http://cr.openjdk.java.net/~ssadetsky/8145547/webrev.02/ --Semyon On 3/17/2016 3:57 PM, Sergey Bylokhov wrote: On 16.03.16 20:52, Semyon Sadetsky wrote: Hi Phil, Thank for review. You will find my reply below in the text

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-15 Thread Phil Race
There is a lot to read here. I think I need to patch and try it but first ... Two high level questions : 1) Have you verified that this behaves properly (or no worse than currently) with -Djava.awt.headless=true since Swing components are supposed to be able to draw off-screen in headless mode .

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-09 Thread Semyon Sadetsky
Hi Sergey, I confirm that it is built. I built it locally on Linux and Solaris. --Semyon On 3/9/2016 1:00 PM, Sergey Bylokhov wrote: Hi, Semyon. A few initial questions. Please confirm that the changes were build successfully on all platforms via jprt. I assume that jck passed after the fix.

Re: Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-09 Thread Sergey Bylokhov
Hi, Semyon. A few initial questions. Please confirm that the changes were build successfully on all platforms via jprt. I assume that jck passed after the fix. On 06.03.16 0:14, Semyon Sadetsky wrote: Hello, Please review fix for JDK9: bug: https://bugs.openjdk.java.net/browse/JDK-8145547 w

Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux

2016-03-05 Thread Semyon Sadetsky
Hello, Please review fix for JDK9: bug: https://bugs.openjdk.java.net/browse/JDK-8145547 webrev: http://cr.openjdk.java.net/~ssadetsky/8145547/webrev.00/ The fix contains GTK3 based implementation for Swing GTK LnF, AWT FileChooser for Linux and AWT Robot for Linux. Also the new system propert