3

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.
  • 1
    This might be an issue with the Linux video driver. Try installing the VirtualBox Guest Additions in Linux if you haven't already done so. – Jesper Mar 27 '13 at 12:20
  • I have often found that Ubuntu video on VirtualBox is less than perfect, even with Guest Additions. Try it on Wubi: http://www.ubuntu.com/download/desktop/windows-installer – NickJ Mar 27 '13 at 12:35
  • I have the guest add-ons installed, sorry meant to specify that. – user2215336 Mar 27 '13 at 12:40
  • @NickJ I was really hoping someone who is already running a non-vm'd Linux would try this out. I really don't want to install another OS just to find out its broken. But if it comes to it I guess thats what I'll have to do. Another question I might add is: What distro. of Linux would be good to try on Oracle VirtualBox that might support this? I've also tried the Mint distro, but I think this is basically Ubuntu with some extra GUI tools. – user2215336 Mar 27 '13 at 12:46
  • that's why I suggested Wubi - it installs Ubuntu as if it were a Windows app, so you don't need another machine. – NickJ Mar 27 '13 at 14:07
  • @NickJ if you want to put that as an answer I will accept it. Findings: I bit the bullet and installed Ubuntu using Wubi and tested the Oracle Translucent window after fighting getting OpenJDK to update to 7. The end result: It works! So VirtualBox was definitely the problem. However, I now have another problem which I'll post under another topic as its a bit different. – user2215336 Mar 29 '13 at 13:43
  • New problem posted here [Java Window Translucency Animation Flicker on Linux](http://stackoverflow.com/questions/15704947/java-window-translucency-animation-flicker-on-linux) – user2215336 Mar 29 '13 at 14:15

1 Answers1

0

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.