On Fri, 13 Jun 2025 01:00:31 GMT, Thiago Milczarek Sayao <tsa...@openjdk.org> wrote:
> Upgrade the minimum required GTK version for JavaFX to GTK 3.20 to enable > modern features and better Linux desktop integration. > > JavaFX currently depends on GTK 3.8, > [released](https://mail.gnome.org/archives/gtk-devel-list/2013-March/msg00108.html) > in March 2013. This version is outdated and predates many useful GTK API > improvements. > > GTK 3.20 was > [released](https://mail.gnome.org/archives/gtk-list/2016-March/msg00026.html) > on March 21, 2016. > > Updating the GTK minimum requirement to 3.20 would enable JavaFX to support > new features, including the improvements proposed in #1605 > > Major Linux distributions already provide GTK 3.20 or newer: > - Ubuntu LTS 18.04+ (ships GTK 3.22+) > - Debian 9+ (ships GTK 3.22+) > - Fedora 24+ (ships GTK 3.20+) > - Oracle Linux and Red Hat Enterprise Linux 8+ (ships GTK 3.22+) I ran a CI build including headful tests, and all looks good to me. Running on a system (my old Ubuntu 16.04 box) with an older GTK3 fails with the expected error message: Exception in thread "main" java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1164) Caused by: java.lang.UnsupportedOperationException: Minimum GTK version required is 3.20.0. System has 3.18.9. at javafx.graphics@25-ea/com.sun.glass.ui.gtk.GtkApplication._initGTK(Native Method) at javafx.graphics@25-ea/com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:165) at javafx.graphics@25-ea/com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:40) at javafx.graphics@25-ea/com.sun.glass.ui.Application.run(Application.java:143) ... Compiling on a machine with an older GTK3 fails with the expected error message: Starting process 'command 'pkg-config''. Working directory: . Command: pkg-config --exists gtk+-3.0 >= 3.20.0 Successfully started process 'command 'pkg-config'' FAILURE: Build failed with an exception. * Where: Script 'buildSrc/linux.gradle' line: 103 * What went wrong: A problem occurred evaluating script. > GTK3 3.20.0+ development packages not found. If GTK3 packages are installed, > please remove the build directory and try again. @tsayao The review likely won't be finished until Monday, but even if it is, please wait until then to give others time to comment. I left one minor suggestion and will reapprove if you make changes. @lukostyra Can you be the second reviewer? @tiainen Do you also want a change to build it? I don't imagine it will cause you any problems, but wanted to give you a chance to comment. buildSrc/linux.gradle line 28: > 26: ext.LINUX = [:] > 27: > 28: def gtk3MinMinorVersion = "20" Minor: maybe add a comment saying that the minimum GTK3 version is 3.20? ------------- Marked as reviewed by kcr (Lead). PR Review: https://git.openjdk.org/jfx/pull/1825#pullrequestreview-2925521698 PR Comment: https://git.openjdk.org/jfx/pull/1825#issuecomment-2971031398 PR Review Comment: https://git.openjdk.org/jfx/pull/1825#discussion_r2145529940