How to make window transparent?


#1

Hi everybody~

I'd like to know, how would I go about making a transparent window in Linux? I've tried setOpaque(false), but that didn't seem to do the trick.. and now I don't know what else to try :/

Sorry for such a trivial question, and thanks.


#2

I believe there's some dialog windows with transparency in the JUCE Demo. Perhaps that should be the first place to look.


#3

Just checked it out, there doesn't seem to be anything special about it, besides not having setOpaque(true), and the paint routine filling with a transparent blue.

If it helps, I'm using the demo project from the [url=http://www.juce.com/doc/tutorial_handling_midi_events]Handling MIDI Events[/url] tutorial. Even commenting out the setContentOwned() call, and passing a transparent colour (like Colours::transparentBlack) to the DocumentWindow constructor, I get a solid black window. Calling isOpaque() on the window returns 0.

It didn't occur to me before, but I think I should mention that I've been building for 32-bit Linux. Could this be the problem?


#4

Currently JUCE does not support transparent windows under linux. I don't think this would be easy to implement either. See for example this stackoverflow post.