Java Window Translucency on Linux

可紊 提交于 2019-12-11 03:14:41

问题


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:

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:


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.



来源:https://stackoverflow.com/questions/15658589/java-window-translucency-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!