[Qt-interest] Always on top, transparent window, no title - Mac OS X

Colin S. Miller no-spam-thank-you at csmiller.demon.co.uk
Sun Jan 31 22:21:39 CET 2010


John Clayton wrote:
> Hi All,
> 
> I'd like to make an 'overlay' window on Mac OS X using Qt, that is 
> transparent and has no title bar.  The window will be used to draw the 
> outlines of other windows - so it needs to cover/overlay the entire area 
> of all displays attached to the computer.  The outlines of other windows 
> will be drawn using the standard QPainter calls.
> 
> I'd like to know what the best way is to achieve the following:
> - fully transparent window
> - that stays on top, always - "on top" meaning on the top of all other 
> windows of any other app
> - can be drawn on 
> - ignores mouse events entirely, mouse events *must* be delivered to 
> apps underneath this window
> - spans the entire display(s)
> 

John,
are you trying to implement a window manager?

They normally work by detecting when a top-level window is created,
and then making a new top-level window to contain the program's window.
The program's window is then reparented to be a child of the WM's window.

The WM's window will contain any decoration around the edges of the
program's window.

Search for "reparenting window manager" for more details of how this works.

HTH,
Colin S. Miller




More information about the Qt-interest-old mailing list