[compiz] Decoration manager questions

David Reveman davidr at novell.com
Tue Apr 17 17:31:11 PDT 2007

On Wed, 2007-04-18 at 00:05 +0200, gasol wrote:
> Im trying to write a Windowmaker look-a-like decorator to compiz, tho,
> im not really sure im doing it the right way, The way im doing it
> right now is telling libdecorator that i´m interested in becoming the
> "manager" of the current screen. Then i select the StructureNotify
> events on the root window and try to snoop out when a new window is
> created and mapped, and then reparent it onto my parent window (frame)
> and then handle event that are sent to the frame. 
> So i was wondering, is this the 'right' approach to the problem? I've
> been reading some of the code too the GTK-decorator but i have never
> coded any glib/gtk applications so its a bit hard too understand
> exactly whats going on there. 

You're not allowed to reparent any windows. Input-only frame windows are
created by compiz and you can get the XID for these windows by reading
the _NET_FRAME_WINDOW property set on each top-level client window by
compiz. You should select for input events on these frame windows and
all window decorations that you want the decoration plugin to draw
around client windows are specified using the decoration interface.
libdecoration, will help you with the hard part of that.

> To move and resize the window I can send a _NET_WM_MOVERESIZE atom to
> the root window and compiz handles that for me (with a nice wobbly
> effect ^_^), I was wondering can i do the same thing with minimize /
> shade / close actions on a window or do my decorator have to handle
> that itself?

There's client messages for most things you want to do in a decorator.
Have a look at:


- David

More information about the compiz mailing list