JDK-6849774 : Visible frame not becoming Transparent in Ubuntu
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux_ubuntu
  • CPU: generic
  • Submitted: 2009-06-10
  • Updated: 2011-01-19
  • Resolved: 2009-10-30
Related Reports
Duplicate :  
Relates :  
Description
I have a frame with 2 buttons and an undecorated frame. When I click on the first button on the first frame ,the undecorated frame remains opaque and when I click on the 2nd button the undecorated frame becomes transparent. But on ubuntu the undecorated frame does not become transparent from the second click onwards.

Steps to reproduce:

1.Run the attached testcase (TestOpacity.java)
2.Click the 2nd button (Not Opaque)on the first frame.
  Notice the undecorated frame becomes transparent.
3. Now click on the 1st button (Opaque) . The undecorarted frame becomes opaque.
4. Now again click on the 2nd button.
If you see that the frame is not becoming transparent the issue is reproduced.
This works fine on Windows.

I reproduced this on Ubuntu with Jdk7b60 pit build.

Comments
EVALUATION Actually, the test is not 100% correct. When using the com.sun.awt.AWTUtilities API to make a window non-opaque, one MUST create a frame with a translucency-capable graphics configuration. The current implementation, however, enables to run correctly even w/o that. Anyway, this bug is a duplicate of 6848852: after restoring the setDoubleBuffered(isOpaque) calls in the Window.setLayersOpaque() method, the test starts working correctly. Note that until the bug 6848852 is fixed, that is unfeasible to test transparency on X11 because it simply does not work. There's one side note also: when the frame goes non-opaque for the first time, its graphics configuration gets changes to a translucency-capabe one. On X11 this involves recreating the peer by calling the pair remove/addNotify() methods (see Component.setGraphicsConfiguration()). In some cases the frame gets relocated after replacing the peer. This issue will be covered by 6895647.
30-10-2009