summaryrefslogtreecommitdiff
path: root/neg.c
diff options
context:
space:
mode:
Diffstat (limited to 'neg.c')
-rw-r--r--neg.c21
1 files changed, 16 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);