changeset 10277:e51840480603

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 Tue, 18 Nov 2014 17:50:08 +0400
parents fc0947a59867
children 67a7e08198c7
files src/solaris/classes/sun/awt/X11/XWM.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/awt/X11/XWM.java	Sun Nov 09 22:17:45 2014 +0300
+++ b/src/solaris/classes/sun/awt/X11/XWM.java	Tue Nov 18 17:50:08 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);
     }
 
     /*