~linaro-maintainers/compiz-plugins-main/overlay-gl

« back to all changes in this revision

Viewing changes to debian/patches/fix-864476.patch

  • Committer: Alexandros Frantzis
  • Date: 2012-04-20 12:09:00 UTC
  • Revision ID: alexandros.frantzis@linaro.org-20120420120900-zum58u2c173gi7u3
* debian/*:
  - Sync with latest precise package 1:0.9.7.0~bzr19-0ubuntu10

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 @@
7
 
            }
8
 
        }
9
 
 
10
 
-       popLockedPaintList ();
11
 
-
12
 
-       foreach (CompWindow *w, windowsFinishedAnimations)
13
 
-       {
14
 
-           AnimWindow *aw = AnimWindow::get (w);
15
 
-           aw->priv->notifyAnimation (false);
16
 
-           aw->priv->postAnimationCleanUp ();
17
 
-       }
18
 
-
19
 
-       const CompWindowList &ppl = pushLockedPaintList ();
20
 
-
21
 
-       foreach (CompWindow *w, ppl)
22
 
+       foreach (CompWindow *w, pl)
23
 
        {
24
 
            PrivateAnimWindow *aw = AnimWindow::get (w)->priv;
25
 
            if (aw->curAnimation ())
26
 
                aw->curAnimation ()->postPreparePaint ();
27
 
        }
28
 
 
29
 
-       if (!animStillInProgress)
30
 
-       {
31
 
-           activateEvent (false);
32
 
-           mLastRedrawTimeFresh = false;
33
 
-
34
 
-           // Reset stacking related info after all animations are done.
35
 
-           ExtensionPluginAnimation *extPlugin =
36
 
-               static_cast<ExtensionPluginAnimation *> (mExtensionPlugins[0]);
37
 
-           extPlugin->resetStackingInfo ();
38
 
-       }
39
 
-
40
 
        popLockedPaintList ();
41
 
     }
42
 
 
43
 
@@ -1396,6 +1374,50 @@
44
 
 {
45
 
     assert (mAnimInProgress);
46
 
 
47
 
+    const CompWindowList &pl = pushLockedPaintList ();
48
 
+    CompWindowList       windowsFinishedAnimations;
49
 
+
50
 
+    bool animStillInProgress = false;
51
 
+
52
 
+    /* Paint list includes destroyed windows */
53
 
+    for (CompWindowList::const_reverse_iterator rit = pl.rbegin ();
54
 
+        rit != pl.rend (); rit++)
55
 
+    {
56
 
+       CompWindow *w = (*rit);
57
 
+       AnimWindow *animWin = AnimWindow::get (w);
58
 
+       PrivateAnimWindow *aw = animWin->priv;
59
 
+       Animation *curAnim = aw->curAnimation ();
60
 
+
61
 
+       if (curAnim)
62
 
+       {
63
 
+           bool finished = (curAnim->remainingTime () <= 0);
64
 
+           if (finished) // Animation is done
65
 
+               windowsFinishedAnimations.push_back (w);
66
 
+           else
67
 
+               animStillInProgress = true;
68
 
+       }
69
 
+    }
70
 
+
71
 
+    popLockedPaintList ();
72
 
+
73
 
+    foreach (CompWindow *w, windowsFinishedAnimations)
74
 
+    {
75
 
+       AnimWindow *aw = AnimWindow::get (w);
76
 
+       aw->priv->notifyAnimation (false);
77
 
+       aw->priv->postAnimationCleanUp ();
78
 
+    }
79
 
+
80
 
+    if (!animStillInProgress)
81
 
+    {
82
 
+       activateEvent (false);
83
 
+       mLastRedrawTimeFresh = false;
84
 
+
85
 
+       // Reset stacking related info after all animations are done.
86
 
+       ExtensionPluginAnimation *extPlugin =
87
 
+               static_cast<ExtensionPluginAnimation *> (mExtensionPlugins[0]);
88
 
+       extPlugin->resetStackingInfo ();
89
 
+    }
90
 
+
91
 
     cScreen->damagePending ();
92
 
 
93
 
     cScreen->donePaint ();