core/pkgs/by-name/ja/java/openjdk/swing-use-gtk-jdk10.patch

25 lines
1.2 KiB
Diff
Raw Normal View History

2024-05-02 00:46:19 +00:00
--- a/src/java.desktop/share/classes/javax/swing/UIManager.java
+++ b/src/java.desktop/share/classes/javax/swing/UIManager.java
@@ -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);