- recognize cwm as a Non-Reparenting window manager for when cwm

is changed to suport NetWMName. As discussed with oga@
This commit is contained in:
kurt 2009-10-16 02:22:26 +00:00
parent 3c279e7859
commit ab695a3f28
2 changed files with 54 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.33 2009/10/07 20:35:47 kili Exp $
# $OpenBSD: Makefile,v 1.34 2009/10/16 02:22:26 kurt Exp $
SHARED_ONLY= Yes
ONLY_FOR_ARCHS= i386 amd64
@ -10,8 +10,8 @@ B= b72
DISTFILES= openjdk-7-ea-src-${B}-17_sep_2009.zip \
jibx_1_1_5.zip:0
PKGNAME= jdk-${V}
PKGNAME-main= jdk-${V}${B}
PKGNAME-jre= jre-${V}${B}
PKGNAME-main= jdk-${V}${B}p0
PKGNAME-jre= jre-${V}${B}p0
CATEGORIES= devel/jdk java

View File

@ -0,0 +1,51 @@
$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;
}