[compiz] setWindowState(), how use it?

Bellegarde Cedric gnumdk at puffy.homelinux.org
Sat Dec 9 17:03:04 PST 2006


I'm trying to add some options in state plugin:
-skipTaskBar
-skipPager
-above
-below

I use setWindowState() to do this but:
- It currently only works for skipTaskBar && skipPager
- For above and below, it works but only for newly created windows

here the code:

    if (skipTaskBar != -1)
        windowState |= CompWindowStateSkipTaskbarMask;

    if (skipPager != -1)
        windowState |= CompWindowStateSkipPagerMask;

    if (above != -1)
        windowState |= CompWindowStateAboveMask;
    else if (below != -1)
	windowState |= CompWindowStateBelowMask;

    setWindowState(w->screen->display, 
	                          w->state|windowState,
		                  w->id);

Any idea why already existing windows don't get above/below on the fly, if i 
use xprop, i can see _NET_WM_STATE_ABOVE but compiz seems to ignore this (if 
i restart compiz or start kwin --replace, window is above).

Here is a solution but it use xlib code.
http://forum.go-compiz.org/viewtopic.php?t=141&start=15

Cedric


More information about the compiz mailing list