Your message dated Mon, 16 Mar 2009 09:03:11 +0100
with message-id <[email protected]>
and subject line Re: java programs with empty gray windows
has caused the Debian Bug report #508650,
regarding java programs with empty gray windows
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
508650: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: openjdk-6-jre
Version: 6b11-9
Severity: important
Tags: patch

It is an long standing bug that java programs come with empty gray
windows when run in non-reparenting window managers.
(For example compare http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6509038)

The old workaround was to export AWT_TOOLKIT=MToolkit, which no longer
is available (compare http://bugs.debian.org/504524), so until this is
fixed properly, it needs a new workaround.

The attached patch allows an other workaround by fixing java's behaviour
when the new environment variable _JAVA_AWT_WM_NONREPARENTING is set.

Given the large number of window managers with this problem, I'd rather
see this the default and workarounds only for known-buggy window
managers, but I guess it is too late for this in the release.
This is why the patch keeps the buggy default behaviour and only fixes
it when the environment variable is set (as without any variable, it also
did not work in etch, so it is not that big a regression).

openjre maintainers, release team, any opinions on that?

Hochachtungsvoll,
        Bernhard R. Link
diff --git a/jdk/src/solaris/classes/sun/awt/X11/XWM.java b/jdk/src/solaris/classes/sun/awt/X11/XWM.java
index 68d1ff7..878327e 100644
--- openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java
+++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java
@@ -98,11 +98,14 @@ class XWM implements MWMConstants, XUtilConstants {
         ICE_WM = 10,
         METACITY_WM = 11,
         COMPIZ_WM = 12,
-        LG3D_WM = 13;
+        LG3D_WM = 13,
+        OTHER_NONREPARENTING_WM = 14;
     public String toString() {
         switch  (WMID) {
           case NO_WM:
               return "NO WM";
+          case OTHER_NONREPARENTING_WM:
+              return "Other non-reparenting WM";
           case OTHER_WM:
               return "Other WM";
           case OPENLOOK_WM:
@@ -564,7 +567,7 @@ class XWM implements MWMConstants, XUtilConstants {
     }
 
     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);
     }
 
     /*
@@ -764,9 +767,17 @@ class XWM implements MWMConstants, XUtilConstants {
              * 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.
@@ -777,6 +788,8 @@ class XWM implements MWMConstants, XUtilConstants {
                 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;
             }
@@ -1298,6 +1311,7 @@ class XWM implements MWMConstants, XUtilConstants {
                   res = new Insets(28, 6, 6, 6);
                   break;
               case NO_WM:
+              case OTHER_NONREPARENTING_WM:
               case LG3D_WM:
                   res = zeroInsets;
                   break;

--- End Message ---
--- Begin Message ---
Version: 6b11-9.1
Version: 6b14-1.5~pre1-3


--- End Message ---

Reply via email to