summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-07-27 14:49:12 +0200
committerDanny Baumann <dannybaumann@web.de>2008-07-27 14:49:12 +0200
commite68959d3ec7f652795589f553accd4cef9e6904c (patch)
treea2b7341f65abb83507e2b92c0e4304a0540d70ea /plugins
parent4a3acf3dfc23b03b8e73e25ec46a17f78e7e8bdf (diff)
Don't touch paint modifiers directly.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/fade.c44
1 files changed, 8 insertions, 36 deletions
diff --git a/plugins/fade.c b/plugins/fade.c
index 7d461909..778ad6c6 100644
--- a/plugins/fade.c
+++ b/plugins/fade.c
@@ -214,6 +214,7 @@ fadePaintWindow (CompWindow *w,
CompScreen *s = w->screen;
Bool status;
+ FADE_DISPLAY (s->display);
FADE_SCREEN (s);
FADE_WINDOW (w);
@@ -225,7 +226,8 @@ fadePaintWindow (CompWindow *w,
fw->unmapCnt ||
fw->opacity != attrib->opacity ||
fw->brightness != attrib->brightness ||
- fw->saturation != attrib->saturation)
+ fw->saturation != attrib->saturation ||
+ fd->displayModals)
{
WindowPaintAttrib fAttrib = *attrib;
@@ -241,6 +243,11 @@ fadePaintWindow (CompWindow *w,
if (value != 100 && s->canDoSlightlySaturated)
fAttrib.saturation = fAttrib.saturation * value / 100;
}
+ else if (fd->displayModals && !fw->dModal)
+ {
+ fAttrib.brightness = 0xa8a8;
+ fAttrib.saturation = 0;
+ }
if (fw->fadeOut)
fAttrib.opacity = 0;
@@ -355,22 +362,8 @@ fadeAddDisplayModal (CompDisplay *d,
if (fd->displayModals == 1)
{
CompScreen *s;
-
for (s = d->screens; s; s = s->next)
- {
- for (w = s->windows; w; w = w->next)
- {
- FADE_WINDOW (w);
-
- if (fw->dModal)
- continue;
-
- w->paint.brightness = 0xa8a8;
- w->paint.saturation = 0;
- }
-
damageScreen (s);
- }
}
}
@@ -390,25 +383,8 @@ fadeRemoveDisplayModal (CompDisplay *d,
if (fd->displayModals == 0)
{
CompScreen *s;
-
for (s = d->screens; s; s = s->next)
- {
- for (w = s->windows; w; w = w->next)
- {
- FADE_WINDOW (w);
-
- if (fw->dModal)
- continue;
-
- if (w->alive)
- {
- w->paint.brightness = w->brightness;
- w->paint.saturation = w->saturation;
- }
- }
-
damageScreen (s);
- }
}
}
@@ -842,10 +818,6 @@ fadeFiniWindow (CompPlugin *p,
fadeRemoveDisplayModal (w->screen->display, w);
fadeWindowStop (w);
- w->paint.opacity = w->opacity;
- w->paint.brightness = w->brightness;
- w->paint.saturation = w->saturation;
-
free (fw);
}