mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 12:42:24 +00:00
openjdk8: add a patch to use GTK when available by default
This commit is contained in:
parent
a15c943337
commit
9d7c9cc32e
|
@ -89,6 +89,8 @@ let
|
|||
] ++ lib.optionals (!minimal && enableInfinality) [
|
||||
./004_add-fontconfig.patch
|
||||
./005_enable-infinality.patch
|
||||
] ++ lib.optionals (!minimal && enableGnome2) [
|
||||
./swing-use-gtk.patch
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
|
|
26
pkgs/development/compilers/openjdk/swing-use-gtk.patch
Normal file
26
pkgs/development/compilers/openjdk/swing-use-gtk.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
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);
|
||||
|
Loading…
Reference in a new issue