summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-04-08 10:30:23 +0200
committerDanny Baumann <dannybaumann@web.de>2008-04-08 10:30:23 +0200
commit27ddf0850304e5ff35366a70f78185462ee08074 (patch)
tree371cf75561168f3e1d4d710395c8b6d8e555f4d3
parent9b89e99d907c829071c5acd596ffa75af3b683cc (diff)
downloadneg-compiz-0.8.tar.gz
neg-compiz-0.8.tar.bz2
Added option that allows negating the decorations as well.compiz-0.8
-rw-r--r--neg.c21
-rw-r--r--neg.xml.in5
2 files changed, 21 insertions, 5 deletions
diff --git a/neg.c b/neg.c
index 4535f55..54cfa81 100644
--- a/neg.c
+++ b/neg.c
@@ -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);
diff --git a/neg.xml.in b/neg.xml.in
index fa52dc2..f2992a2 100644
--- a/neg.xml.in
+++ b/neg.xml.in
@@ -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>