diff options
author | Danny Baumann <dannybaumann@web.de> | 2008-04-08 10:30:23 +0200 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2008-04-08 10:30:23 +0200 |
commit | 27ddf0850304e5ff35366a70f78185462ee08074 (patch) | |
tree | 371cf75561168f3e1d4d710395c8b6d8e555f4d3 | |
parent | 9b89e99d907c829071c5acd596ffa75af3b683cc (diff) | |
download | neg-27ddf0850304e5ff35366a70f78185462ee08074.tar.gz neg-27ddf0850304e5ff35366a70f78185462ee08074.tar.bz2 |
Added option that allows negating the decorations as well.compiz-0.8
-rw-r--r-- | neg.c | 21 | ||||
-rw-r--r-- | neg.xml.in | 5 |
2 files changed, 21 insertions, 5 deletions
@@ -225,21 +225,32 @@ NEGDrawWindowTexture (CompWindow *w, const FragmentAttrib *attrib, unsigned int mask) { - int filter; + int filter; + Bool doNeg = FALSE; NEG_SCREEN (w->screen); NEG_WINDOW (w); - /* only negate window contents; that's the only case - where w->texture->name == texture->name */ - if (nw->isNeg && (texture->name == w->texture->name)) + if (nw->isNeg) + { + if (negGetNegDecorations (w->screen)) + doNeg = TRUE; + else + doNeg = (texture->name == w->texture->name); + } + + if (doNeg) { if (w->screen->fragmentProgram) { FragmentAttrib fa = *attrib; int function; + Bool alpha = TRUE; + + if (texture->name == w->texture->name) + alpha = w->alpha; - function = getNegFragmentFunction (w->screen, texture, w->alpha); + function = getNegFragmentFunction (w->screen, texture, alpha); if (function) addFragmentFunction (&fa, function); @@ -32,6 +32,11 @@ <_long>Windows to exclude from negating</_long> <default>type=Desktop</default> </option> + <option name="neg_decorations" type="bool"> + <_short>Negate Decorations</_short> + <_long>Also negate window decorations, not only the window contents.</_long> + <default>false</default> + </option> </screen> </plugin> </compiz> |