1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 16:11:58 +00:00
nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk8.patch
Austin Seipp 14e0251362 openjdk8: rename swing patch to be more consistent with the others
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-04-01 15:18:47 -05:00

27 lines
1.3 KiB
Diff

diff -ru3 a/jdk/src/share/classes/javax/swing/UIManager.java b/jdk/src/share/classes/javax/swing/UIManager.java
--- a/jdk/src/share/classes/javax/swing/UIManager.java 2016-07-26 00:41:37.000000000 +0300
+++ b/jdk/src/share/classes/javax/swing/UIManager.java 2016-10-02 22:46:01.890071761 +0300
@@ -607,11 +607,9 @@
if (osType == OSInfo.OSType.WINDOWS) {
return "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
} else {
- String desktop = AccessController.doPrivileged(new GetPropertyAction("sun.desktop"));
Toolkit toolkit = Toolkit.getDefaultToolkit();
- if ("gnome".equals(desktop) &&
- toolkit instanceof SunToolkit &&
- ((SunToolkit) toolkit).isNativeGTKAvailable()) {
+ if (toolkit instanceof SunToolkit &&
+ ((SunToolkit) toolkit).isNativeGTKAvailable()) {
// May be set on Linux and Solaris boxs.
return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
}
@@ -1341,7 +1339,7 @@
lafName = (String) lafData.remove("defaultlaf");
}
if (lafName == null) {
- lafName = getCrossPlatformLookAndFeelClassName();
+ lafName = getSystemLookAndFeelClassName();
}
lafName = swingProps.getProperty(defaultLAFKey, lafName);