summaryrefslogtreecommitdiff
path: root/testing/java7-openjdk/openjdk7_nonreparenting-wm.diff
blob: ba1a588e198bdcfd2acd8af430a7bf4f30c40b6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
--- openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java.orig	2011-08-07 18:45:05.000000000 +0200
+++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java	2011-08-07 18:45:54.000000000 +0200
@@ -102,7 +102,8 @@
         METACITY_WM = 11,
         COMPIZ_WM = 12,
         LG3D_WM = 13,
-        MUTTER_WM = 14;
+        MUTTER_WM = 14,
+        OTHER_NONREPARENTING_WM = 15;
     public String toString() {
         switch  (WMID) {
           case NO_WM:
@@ -576,7 +577,7 @@
     // TODO: according to wikipedia, compiz is now reparenting. This should
     // probably be updated.
     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.OTHER_NONREPARENTING_WM);
     }
 
     /*
@@ -762,9 +763,17 @@
              * supports WIN or _NET wm spec.
              */
             else if (l_net_protocol.active()) {
-                awt_wmgr = XWM.OTHER_WM;
+                if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
+                    awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
+                } else {
+                    awt_wmgr = XWM.OTHER_WM;
+		}
             } else if (win.active()) {
-                awt_wmgr = XWM.OTHER_WM;
+                if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
+                    awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
+                } else {
+                    awt_wmgr = XWM.OTHER_WM;
+		}
             }
             /*
              * Check for legacy WMs.
@@ -775,6 +784,8 @@
                 awt_wmgr = XWM.MOTIF_WM;
             } else if (isOpenLook()) {
                 awt_wmgr = XWM.OPENLOOK_WM;
+            } else if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
+                awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
             } else {
                 awt_wmgr = XWM.OTHER_WM;
             }
@@ -1289,6 +1300,7 @@
                   res = new Insets(28, 6, 6, 6);
                   break;
               case NO_WM:
+              case OTHER_NONREPARENTING_WM:
               case LG3D_WM:
                   res = zeroInsets;
                   break;