Shaped windows don't require a 32-bit visual.
Transparency does.
You can check what visuals are provided by invoking "xdpyinfo".
Usually the last visual listed is 32 bits (if you have one at all).
I don't think it has to do with your video card so much as your X11
and window manager setup.
Your X11 config file needs to have the "Composite" extension enabled
(google on this); your window manager has its own specific settings
(I use a vanilla xubuntu setup, but I vaguely recall having to tweak
the X11 conf and something in xfce).
Google "x11 enable composite transparency" and filter on your current
system + window manager + X11 setup.
On Dec 12, 2007, at 1:17 PM, Shaun Haney wrote:
In Linux, I am trying to run a transparent window demo using JNA,
and am getting the following stacktrace:
Exception in thread "main" java.lang.UnsupportedOperationException:
This X11 display does not provide a 32-bit visual
at com.sun.jna.examples.WindowUtils
$X11WindowUtils.setWindowTransparent(WindowUtils.java:1029)
at com.sun.jna.examples.WindowUtils.setWindowTransparent
(WindowUtils.java:1141)
at com.basis.techcon07.TransparentWindow.<init>
(TransparentWindow.java:66)
at com.basis.techcon07.TransparentWindow.<init>
(TransparentWindow.java:57)
at com.basis.techcon07.TransparentWindow.main
(TransparentWindow.java:108)
I’ve tried this on several configurations, including Gnome on
Fedora Core 2 and Xfce and KDE on Ubuntu 6.06.1. From what I’ve
read, most videocard manufacturers (Nvidia and ATI come to mind)
make 24-bit color Linux drivers for their videocards, but not 32-
bit ones due to the fact that the last byte is usually used for
transparency.
Has anyone had success with transparent and shaped windows under
Linux? Is there a specific configuration I need in order to get
things working?
I suppose I should tweak the demo to do the shaped window even if the
transparency isn't supported.