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

Semyon Sadetsky semyon.sadetsky at oracle.com
Mon Apr 25 08:16:08 UTC 2016


The issues


were filed. So ready to push then...


On 4/22/2016 10:41 PM, Phil Race wrote:
> 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/11/2016 12:49 AM, Semyon Sadetsky wrote:
>> 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 scenarios 
>> from the flexible "jdk.gtk.version" property your see. It would be 
>> also great if you provide test cases. Then we will systematize all 
>> pros and cons and elaborate the final solution. Are you good with that?
>> --Semyon
>> On 4/8/2016 1:49 PM, Sergey Bylokhov wrote:
>>> 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 loaded regardless of the property value.
>>> We already found that there is a problem in synchronization, there 
>>> is some other cases, which can be introduced in the future. To 
>>> eliminate even the possibility of such missconfigurationion, it 
>>> would be better try to load only the one version which was set by 
>>> "jdk.gtk.version" for the first time. It will solve bunch of 
>>> possible issues.
>>>>> It will be better to make it obvious and not to depends on some 
>>>>> order.
>>>>> I am curious where you find it widely used. At least in the client I
>>>>> found only one usage.
>>>> I can help you. Look at GTKEngine.java: WidgetType, StateType, 
>>>> Settings,
>>>> ShadowType, Orientation, PositionType, etc...
>>> Thanks, this all in one file of gtk look and feel. This is a bad 
>>> pattern, and we should not copy it to the UnixToolkit class. For 
>>> additional information read the spec of ordinal method and 
>>> "Effective Java" by Josh Bloch Item 31.
>>> Also I am not sure that I understand where we survive the hang which 
>>> can occur if we try to load the gtk library if it was loaded before 
>>> by the other applications(like fx or swt).

More information about the swing-dev mailing list