1
=== modified file 'src/animation.cpp'
2
Index: compiz-plugins-main-0.9.6/animation/src/animation.cpp
3
===================================================================
4
--- compiz-plugins-main-0.9.6.orig/animation/src/animation.cpp 2011-10-04 01:29:40.068111883 +0800
5
+++ compiz-plugins-main-0.9.6/animation/src/animation.cpp 2011-10-04 01:29:57.396197802 +0800
6
@@ -1343,35 +1343,13 @@
10
- popLockedPaintList ();
12
- foreach (CompWindow *w, windowsFinishedAnimations)
14
- AnimWindow *aw = AnimWindow::get (w);
15
- aw->priv->notifyAnimation (false);
16
- aw->priv->postAnimationCleanUp ();
19
- const CompWindowList &ppl = pushLockedPaintList ();
21
- foreach (CompWindow *w, ppl)
22
+ foreach (CompWindow *w, pl)
24
PrivateAnimWindow *aw = AnimWindow::get (w)->priv;
25
if (aw->curAnimation ())
26
aw->curAnimation ()->postPreparePaint ();
29
- if (!animStillInProgress)
31
- activateEvent (false);
32
- mLastRedrawTimeFresh = false;
34
- // Reset stacking related info after all animations are done.
35
- ExtensionPluginAnimation *extPlugin =
36
- static_cast<ExtensionPluginAnimation *> (mExtensionPlugins[0]);
37
- extPlugin->resetStackingInfo ();
40
popLockedPaintList ();
43
@@ -1396,6 +1374,50 @@
45
assert (mAnimInProgress);
47
+ const CompWindowList &pl = pushLockedPaintList ();
48
+ CompWindowList windowsFinishedAnimations;
50
+ bool animStillInProgress = false;
52
+ /* Paint list includes destroyed windows */
53
+ for (CompWindowList::const_reverse_iterator rit = pl.rbegin ();
54
+ rit != pl.rend (); rit++)
56
+ CompWindow *w = (*rit);
57
+ AnimWindow *animWin = AnimWindow::get (w);
58
+ PrivateAnimWindow *aw = animWin->priv;
59
+ Animation *curAnim = aw->curAnimation ();
63
+ bool finished = (curAnim->remainingTime () <= 0);
64
+ if (finished) // Animation is done
65
+ windowsFinishedAnimations.push_back (w);
67
+ animStillInProgress = true;
71
+ popLockedPaintList ();
73
+ foreach (CompWindow *w, windowsFinishedAnimations)
75
+ AnimWindow *aw = AnimWindow::get (w);
76
+ aw->priv->notifyAnimation (false);
77
+ aw->priv->postAnimationCleanUp ();
80
+ if (!animStillInProgress)
82
+ activateEvent (false);
83
+ mLastRedrawTimeFresh = false;
85
+ // Reset stacking related info after all animations are done.
86
+ ExtensionPluginAnimation *extPlugin =
87
+ static_cast<ExtensionPluginAnimation *> (mExtensionPlugins[0]);
88
+ extPlugin->resetStackingInfo ();
91
cScreen->damagePending ();
93
cScreen->donePaint ();