$OpenBSD: patch-jdk_src_solaris_classes_sun_awt_X11_XWM_java,v 1.1 2009/10/16 02:22:26 kurt Exp $
--- jdk/src/solaris/classes/sun/awt/X11/XWM.java.orig	Thu Sep 17 03:52:30 2009
+++ jdk/src/solaris/classes/sun/awt/X11/XWM.java	Fri Oct  9 13:53:33 2009
@@ -101,7 +101,8 @@ final class XWM
         ICE_WM = 10,
         METACITY_WM = 11,
         COMPIZ_WM = 12,
-        LG3D_WM = 13;
+        LG3D_WM = 13,
+        CWM_WM = 14;
     public String toString() {
         switch  (WMID) {
           case NO_WM:
@@ -128,6 +129,8 @@ final class XWM
               return "Compiz";
           case LG3D_WM:
               return "LookingGlass";
+          case CWM_WM:
+              return "CWM";
           case UNDETERMINED_WM:
           default:
               return "Undetermined WM";
@@ -555,6 +558,10 @@ final class XWM
         return isNetWMName("LG3D");
     }
 
+    static boolean isCWM() {
+        return isNetWMName("CWM");
+    }
+
     /*
      * Is Metacity running?
      */
@@ -567,7 +574,7 @@ final class XWM
     }
 
     static boolean isNonReparentingWM() {
-        return (XWM.getWMID() == XWM.COMPIZ_WM || XWM.getWMID() == XWM.LG3D_WM);
+        return (XWM.getWMID() == XWM.COMPIZ_WM || XWM.getWMID() == XWM.LG3D_WM || XWM.getWMID() == XWM.CWM_WM);
     }
 
     /*
@@ -743,6 +750,8 @@ final class XWM
                 awt_wmgr = XWM.COMPIZ_WM;
             } else if (isLookingGlass()) {
                 awt_wmgr = LG3D_WM;
+            } else if (isCWM()) {
+                awt_wmgr = CWM_WM;
             } else if (doIsIceWM && isIceWM()) {
                 awt_wmgr = XWM.ICE_WM;
             }
