I’ve cleaned up a patch to allow semi transparent windows with juce.
At the time, i’ve only implemented a more organic way to obtain 32bit argb Visuals if they are present (if there is a composition manager like compiz, xcompmgr, or metacity compositing running) thru the Xrender extension. If not, or a window is not translucent, the fallback mode of 24/16it is preserved. Actually this feature is enabled only if XSHM extension is enabled: it should be possible to use ARGB32 images with XPutImage too (and not only in companion with XSHM), but from my tests i was getting a huge load of BadMatch in trying to do so. So for now the patch is available only if you are using XSHM.
the only drawback is that we will lose the transparent background of the window if we overwrite it with a translucent one repeatedly (like the drag-me-to-desktop-translucent-component in the jucedemo):
If you look at the desktop component, it leaves trails of the old paint (but it is translucent). Maybe it’s a problem of premultiplying the alpha before blitting ? I don’t know here. Probably i should take care of introducing the Xcomposite extension in the field, so to have a better control over composition of old window background and the new translucent one.
Anyway, to enable the patch only define this:
#define JUCE_USE_XSHM 1
#define JUCE_USE_XRENDER 1
And no other linking library (all is done transparently).
Since this is extremely experimental, i need people to test this over more distros as possible and report feedback, and if anyone would like to contribute with code it will be appreciated cause translucent windows is possible on linux, we only need to teach juce to do so !