1 --- a/src/java.desktop/share/classes/javax/swing/UIManager.java.orig Mon Nov 27 19:15:37 2023
2 +++ b/src/java.desktop/share/classes/javax/swing/UIManager.java Mon Nov 27 19:45:00 2023
4 if (osType == OSInfo.OSType.WINDOWS) {
5 return "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
7 + String xdgCurrentDesktop = System.getenv("XDG_CURRENT_DESKTOP");
8 String desktop = AccessController.doPrivileged(new GetPropertyAction("sun.desktop"));
9 Toolkit toolkit = Toolkit.getDefaultToolkit();
10 - if ("gnome".equals(desktop) &&
11 + if (("mate".equalsIgnoreCase(xdgCurrentDesktop) ||
12 + "gnome".equalsIgnoreCase(xdgCurrentDesktop) ||
13 + "gnome".equals(desktop)) &&
14 toolkit instanceof SunToolkit &&
15 ((SunToolkit) toolkit).isNativeGTKAvailable()) {
16 // May be set on Linux and Solaris boxs.