Question

Using Java 7 window translucency on Windows XP SP3, Vista, 7, 8 and Mac OS X Mountain Lion works great. However, on Linux I cannot get it to work properly.

Using the tutorial found here, specifically the GradientTranslucentWindow example, it seems to work great. But if you change the color to something other than white (the only change I made was set R to 0 in the example code), the frame does not composite correctly:

See this comparison

The isWindowTranslucencySupported method returns true for PERPIXEL_TRANSLUCENT. I'm running Ubuntu 12.04 LTS 32bit with Compiz composite manager with the Composite plugin turned on.

Questions:

  1. What can I do to get this to work? Is it a Linux setting that needs to be changed, a java code change, or what?
  2. Is anyone else having this problem? Java 7 has been out for some time now, but I can't find anyone else having this problem. There are some bug reports in the Java bug database, but they are all "fixed". I have submitted a bug to the Java bug database, but it has yet to appear on the external database.
  3. I'm running Ubuntu under Oracle VirtualBox. Could this be the problem? Sadly, I do not have a machine to install Linux on, so can someone else that is running a non-vm linux try this? EDIT I have the guest add-ons installed.
Was it helpful?

Solution

VirtualBox was indeed the issue (even with guest add-ons). Running a non-vm'ed Ubuntu with proprietary graphics card drivers allows the sample to work as expected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top