--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTaskbarPeer.java Wed Jul 13 10:50:58 2016 +0300
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTaskbarPeer.java Wed Jul 13 12:24:24 2016 +0300
@@ -32,6 +32,7 @@
import sun.awt.UNIXToolkit;
import java.security.AccessController;
+import java.security.PrivilegedAction;
import sun.security.action.GetPropertyAction;
final class XTaskbarPeer implements TaskbarPeer {
@@ -40,6 +41,14 @@
private static boolean initExecuted = false;
private PopupMenu menu = null;
+ private static boolean isUnity;
+
+ static {
+ String de = AccessController.doPrivileged(
+ (PrivilegedAction<String>) ()
+ -> System.getenv("XDG_CURRENT_DESKTOP"));
+ isUnity = de != null && de.equals("Unity");
+ }
private static void initWithLock() {
XToolkit.awtLock();
@@ -68,6 +77,9 @@
}
static boolean isTaskbarSupported() {
+ if (!isUnity) {
+ return false;
+ }
initWithLock();
return nativeLibraryLoaded;
}