JDK-6849212 : Issues with Translucent/Shaped Windows on X11
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: linux_ubuntu
  • CPU: generic
  • Submitted: 2009-06-09
  • Updated: 2011-01-19
  • Resolved: 2009-08-18
Related Reports
Relates :  
Relates :  
Description
This is related to CR 6839999 (Cumulative fix for 6762511 and 6838003).
When I executed the tests Test.java and SampleTest.java on Ubuntu I got the actual results mentioned in the CR 6839999 instead of the expected results.

The first 3 buttons are enabled and the 'Test TRANSLUCENT' button is not
The 'Output Graphics Configurations' button outputs:
X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x21] is Translucency Capable: false
X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x5c] is Translucency Capable: true

Also I have attached the screenshot of what I am seeing. 
I also ran the below command before executing the testcase.
gconftool-2 --type bool --set /apps/metacity/general/compositing_manager true

The platform information is :
on giving command uname -a === > Linux 2.6.27-11-generic 


Also attached are the testcases.

Comments
EVALUATION Testing systems: 1. MS Windows Vista Business. 2. Linux Mandriva/Gnome 2.24/Metacity (compositing_manager option enabled with the gconftool) Differences between Windows and X11 that I observe when running the Test.java: the right third of the PERPIXEL_TRANSLUCENT window is pretty darker on MS Windows than on X11. The same is observed when running the SampleTest.java. Tweaking the tests by setting various values of opacity from 0 to 255 for the rightmost third of the window gives quite reasonable results on both platofrms with the only difference: MS Windows makes the composited picture a bit darker than X11. It is believed that the issue is caused by differences in compositing managers code in X11 and Windows. Apart from the difference in visual presentation, the issue does not seem to be a bug in Java, but rather a platoform-specific nuance. Hence the change request is closed.
18-08-2009

EVALUATION As per 6762511, translucency should work on metacity compositing window manager. The below command enables compositing window manager (as per http://tombuntu.com/index.php/2008/03/31/enable-metacity-compositing-in-gnome-222/) gconftool-2 --type bool --set /apps/metacity/general/compositing_manager true After executing the above command, translucency/shaped windows in fact work on Ubuntu. But, the behavior is somewhat different from expected and it is different from how the feature works on Windows. Please run the testcase attached with 6762511 on Windows and Ubuntu to see the difference.
10-06-2009

EVALUATION This is not a defect in Java. The TRANSLUCENT kind of transclucnecy is only reported as supported when the underlying system (either a window manager (metacity), or a compositing manager (xcompmgr, compiz)) report the feature as supported. Metacity does not do so, hence the button is disabled. Please refer to the #2 Evaluation entry in the bug report 6762511 for more details. Considering the relation between this issue and the 6762511 (and/or 6839999) - they are unrelated because the aim of 6839999 is to fix the PERPIXEL_TRANSLUCENT case, not the TRANSLUCENT one. Again, more details can be found at the evaluation of 6762511.
09-06-2009