views:

290

answers:

2

How to create a rounded window in Ubuntu? Lang: C++

For example like the tipper plugin from Miranda.

A: 

Use cairo and OpenGL to create a transparent window.

LiraNuna
Do you know any example how to use it for create rounded / transparent window?Thanks
john
Just render a rounded rectangle.
LiraNuna
+1  A: 

If you don't care about jagged edges (no anti-aliasing), you can just use the XShape (aka "X11 Nonrectangular Window Shape") extension: this lets you define a "mask" that cuts down the area of your window. Anything outside of this mask, even if it falls within the rectangular area of your window, is see-through and pass-through to the windows below.

If you have a compositing window manager running (xcompmgr, Compiz, etc.) you can additionally create your window as 32-bit ARGB, and use the alpha to blend the edges away. (To avoid confusion, this should be done together with XShape.)

ephemient