summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2008-09-02 00:31:44 +0200
committerDavid Reveman <davidr@novell.com>2008-09-19 10:12:00 -0400
commitdbe3817cc78dbae883ae9d51f81ae62f5747789a (patch)
treecb8cfa144b2f879d9ab2508fd8a80cec83ec7d4e
parentc8f5fb7a01135dfe3ef099091dc09dcc2b547824 (diff)
Walk complete window tree.
-rw-r--r--plugins/fade.c36
1 files changed, 32 insertions, 4 deletions
diff --git a/plugins/fade.c b/plugins/fade.c
index a3703254..44166159 100644
--- a/plugins/fade.c
+++ b/plugins/fade.c
@@ -196,16 +196,31 @@ fadePreparePaintScreen (CompScreen *s,
if (steps < 12)
steps = 12;
- for (w = s->root.windows; w; w = w->next)
+ w = s->root.windows;
+ for (;;)
{
FadeWindow *fw = GET_FADE_WINDOW (w, fs);
fw->steps = steps;
fw->fadeTime = 0;
- }
+ if (w->windows)
+ {
+ w = w->windows;
+ continue;
+ }
+
+ while (!w->next && (w != &s->root))
+ w = w->parent;
+
+ if (w == &s->root)
+ break;
+
+ w = w->next;
+ }
break;
case FADE_MODE_CONSTANTTIME:
- for (w = s->root.windows; w; w = w->next)
+ w = s->root.windows;
+ for (;;)
{
FadeWindow *fw = GET_FADE_WINDOW (w, fs);
@@ -220,8 +235,21 @@ fadePreparePaintScreen (CompScreen *s,
{
fw->steps = 0;
}
+
+ if (w->windows)
+ {
+ w = w->windows;
+ continue;
+ }
+
+ while (!w->next && (w != &s->root))
+ w = w->parent;
+
+ if (w == &s->root)
+ break;
+
+ w = w->next;
}
-
break;
}