SUGGESTED FIX
--- old/src/share/classes/java/awt/Window.java 2008-03-07 17:52:45.000000000 +0300
+++ new/src/share/classes/java/awt/Window.java 2008-03-07 17:52:45.000000000 +0300
@@ -648,8 +648,12 @@
if (shape != null) {
applyShape();
}
- applyOpaque();
- applyOpacity();
+ if (!opaque) {
+ applyOpaque();
+ }
+ if (opacity < 1.0f) {
+ applyOpacity();
+ }
}
}
|
EVALUATION
Seems to be related to the fact that since 6.0u10b12 the AWT uses the Layered Windows machinery. Exactly this machinery is used at the WindowUtils of JNA to enable the trasnparency effect. When both the AWT and the WindowUtils use the same Win API functions, there may happen a kind of a threadrace, when the WindowUtils enables the transparency, and later the AWT disables it. It seems we should follow the same approach as we did at CR 6661455: if an effect (opacity, or translucency) has not been enabled, we don't need to initialize it at the native level.
|