<Swing Dev> Review-request for 8145547: JEP 283: [AWT/Swing] Conditional support for GTK 3 on Linux
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Fri Apr 8 10:49:02 UTC 2016
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).
--
Best regards, Sergey.
More information about the swing-dev
mailing list