JDK-8198654 : Switch FX's default GTK version to 3
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: openjfx11
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-02-23
  • Updated: 2019-06-27
  • Resolved: 2018-03-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8210677 :  
See JDK-8198649 for the description and motivation.

All the same reasons for doing this apply to FX. Additionaly, Swing interop requires the versions of GTK to be the same, so if we don't do this, then Swing interop applications will either get GTK 2 by default or GTK 3 by default depending on which library is loaded first.
Changeset: 3e6c9b6db694 Author: kcr Date: 2018-03-20 13:01 -0700 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/3e6c9b6db694 8198654: Switch FX's default GTK version to 3 Reviewed-by: prr

+1 -phil.

Webrev: http://cr.openjdk.java.net/~kcr/8198654/webrev.00/ In order to minimize the changes, I kept the existing logic which (unfortunately) has knowledge of the default value in both the Java code and the native code. It might be something to consider improving, but didn't seem worth the effort.

This should be a simple one line change to the default value in each of GtkApplication.java and launcher.c. I also want to test that the various swing interop cases will work if the JDK and FX have different defaults (which they will if you run an unbundled FX with this change on an older JDK).