changeset 27284:98699328cef3

8058197: AWT fails on generic non-reparenting window managers Reviewed-by: azvegint, serb Contributed-by: Rohit Agrawal <rohit.agrawal.mn@gmail.com>
author azvegint
date Wed, 22 Oct 2014 13:39:33 +0400
parents 99c4cb470573
children 1b4ca1c84d23 d291fa015bf9
files jdk/src/java.desktop/unix/classes/sun/awt/X11/XWM.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWM.java	Wed Oct 22 12:33:28 2014 +0400
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWM.java	Wed Oct 22 13:39:33 2014 +0400
@@ -595,8 +595,13 @@
         return isNetWMName("Mutter") || isNetWMName("GNOME Shell");
     }
 
+    static int awtWMNonReparenting = -1;
     static boolean isNonReparentingWM() {
-        return (XWM.getWMID() == XWM.COMPIZ_WM || XWM.getWMID() == XWM.LG3D_WM || XWM.getWMID() == XWM.CWM_WM);
+        if (awtWMNonReparenting == -1) {
+            awtWMNonReparenting = (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) ? 1 : 0;
+        }
+        return (awtWMNonReparenting == 1 || XWM.getWMID() == XWM.COMPIZ_WM
+                || XWM.getWMID() == XWM.LG3D_WM || XWM.getWMID() == XWM.CWM_WM);
     }
 
     /*