-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Fix LookAndFeel loader NPE if missing libgtk2.0 #8132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The swing UIManager class detects the correct look and feel settings by looking inside the `sun.desktop` system property, here's the extract of the JDK: String desktop = AccessController.doPrivileged(new GetPropertyAction("sun.desktop")); Toolkit toolkit = Toolkit.getDefaultToolkit(); if ("gnome".equals(desktop) && toolkit instanceof SunToolkit && ((SunToolkit) toolkit).isNativeGTKAvailable()) { // May be set on Linux and Solaris boxs. return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel"; } Since we want always the GTK look and feel (even if the desktop is not strictly a GNOME desktop) we force the `sun.desktop` property always to `gnome`.
✅ Build completed.
Please test this code using one of the following:
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8132-BUILD-797-linux32.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8132-BUILD-797-linux64.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8132-BUILD-797-windows.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8132-BUILD-797-macosx.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8132-BUILD-797-linuxarm.tar.xz
i️ The linuxarm
build is still experimental and may not be always available.
Alternative to #8122 to fix issue #8119