Blame SOURCES/gtk3ToBeReverted.patch

0a1101
0a1101
# HG changeset patch
0a1101
# User andrew
0a1101
# Date 1402501898 -3600
0a1101
# Node ID cadc17b7e20ead881dd17a08f0df12da9dfae612
0a1101
# Parent  d26cf395f1f04d8e14f4f82e619079e1f598719d
0a1101
PR729: GTKLookAndFeel should be the system look&feel on all GNU/Linux desktops
0a1101
Summary: Return GTKLookAndFeel as the system look&feel on local GNU/Linux systems
0a1101
0a1101
diff -r d26cf395f1f0 -r cadc17b7e20e src/share/classes/javax/swing/UIManager.java
0a1101
--- openjdk/jdk/src/share/classes/javax/swing/UIManager.java	Tue Jun 10 22:37:03 2014 +0100
0a1101
+++ openjdk/jdk/src/share/classes/javax/swing/UIManager.java	Wed Jun 11 16:51:38 2014 +0100
0a1101
@@ -606,8 +606,9 @@
0a1101
         } else {
0a1101
             String desktop = AccessController.doPrivileged(new GetPropertyAction("sun.desktop"));
0a1101
             Toolkit toolkit = Toolkit.getDefaultToolkit();
0a1101
-            if ("gnome".equals(desktop) &&
0a1101
-                    toolkit instanceof SunToolkit &&
0a1101
+            boolean gtkDesktop = "gnome".equals(desktop) ||
0a1101
+              (osType == OSInfo.OSType.LINUX && SwingUtilities2.isLocalDisplay());
0a1101
+            if (gtkDesktop && toolkit instanceof SunToolkit &&
0a1101
                     ((SunToolkit) toolkit).isNativeGTKAvailable()) {
0a1101
                 // May be set on Linux and Solaris boxs.
0a1101
                 return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
0a1101