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

« back to all changes in this revision

Viewing changes to debian/patches/fix_clipping_issues_in_expo.patch

  • Committer: Ricardo Salveti de Araujo
  • Date: 2011-10-21 21:33:04 UTC
  • Revision ID: ricardo.salveti@linaro.org-20111021213304-8y1s23z6m8116ldw
* Adding GLES2 support from the Linaro Compiz-Plugins-Main 2011.10 release
* debian/patches: updating patches to be compatible with this release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
=== modified file 'src/expo.cpp'
2
 
Index: compiz-plugins-main-0.9.6/expo/src/expo.cpp
3
 
===================================================================
4
 
--- compiz-plugins-main-0.9.6.orig/expo/src/expo.cpp    2011-10-08 00:08:11.678601665 +0800
5
 
+++ compiz-plugins-main-0.9.6/expo/src/expo.cpp 2011-10-08 00:08:36.906726737 +0800
6
 
@@ -274,7 +274,7 @@
7
 
                                  screen->vp ().y () - selectedVp.y (), true);
8
 
 
9
 
            /* update saved window attributes in case we moved the
10
 
-              window to a new viewport */
11
 
+    window to a new viewport */
12
 
            if (dndWindow->saveMask () & CWX)
13
 
            {
14
 
                dndWindow->saveWc ().x = dndWindow->saveWc ().x % screen->width ();
15
 
@@ -289,13 +289,11 @@
16
 
            }
17
 
 
18
 
            /* update window attibutes to make sure a moved maximized window
19
 
-              is properly snapped to the work area */
20
 
+          is properly snapped to the work area */
21
 
            if (dndWindow->state () & MAXIMIZE_STATE)
22
 
                dndWindow->updateAttributes (CompStackingUpdateModeNone);
23
 
        }
24
 
     }
25
 
-
26
 
-    dndWindows.clear ();
27
 
 }
28
 
 
29
 
 void
30
 
@@ -396,6 +394,29 @@
31
 
     else
32
 
        expoCam = MAX (0.0, expoCam - val);
33
 
 
34
 
+    if (dndState == DnDDuring)
35
 
+    {
36
 
+       foreach (CompWindow *w, dndWindows)
37
 
+           ExpoWindow::get (w)->dndOpacity = MIN (1.0, ExpoWindow::get (w)->dndOpacity + val);
38
 
+    }
39
 
+    else if (dndState == DnDNone)
40
 
+    {
41
 
+       CompWindowList::iterator it = dndWindows.begin ();
42
 
+
43
 
+       while (it != dndWindows.end ())
44
 
+       {
45
 
+           ExpoWindow::get ((*it))->dndOpacity = MAX (0.0, ExpoWindow::get ((*it))->dndOpacity - val);
46
 
+
47
 
+           if (ExpoWindow::get ((*it))->dndOpacity <= 0.0f)
48
 
+           {
49
 
+               dndWindows.erase (it);
50
 
+               it = dndWindows.begin ();
51
 
+           }
52
 
+           else
53
 
+               it++;
54
 
+       }
55
 
+    }
56
 
+
57
 
     if (expoCam)
58
 
     {
59
 
        unsigned int i, j, vp;
60
 
@@ -523,6 +544,11 @@
61
 
        foreach (float& vp, vpActivity)
62
 
            if (vp != 0.0 && vp != 1.0)
63
 
                cScreen->damageScreen ();
64
 
+
65
 
+       foreach (CompWindow *w, dndWindows)
66
 
+           if (ExpoWindow::get (w)->dndOpacity != 0.0f &&
67
 
+               ExpoWindow::get (w)->dndOpacity != 1.0f)
68
 
+               cScreen->damageScreen ();
69
 
     }
70
 
 
71
 
     if (grabIndex && expoCam <= 0.0f && !expoMode)
72
 
@@ -530,7 +556,6 @@
73
 
        screen->removeGrab (grabIndex, NULL);
74
 
        grabIndex = 0;
75
 
        updateWraps (false);
76
 
-       cScreen->damageScreen ();
77
 
     }
78
 
 
79
 
     cScreen->donePaint ();
80
 
@@ -614,9 +639,7 @@
81
 
                    break;
82
 
 
83
 
                dndState  = DnDDuring;
84
 
-
85
 
-               if (std::find (dndWindows.begin (), dndWindows.end (), w) == dndWindows.end ())
86
 
-                   dndWindows.push_back (w);
87
 
+               dndWindows.push_back (w);
88
 
 
89
 
                w->grabNotify (nx, ny, 0,
90
 
                               CompWindowGrabMoveMask |
91
 
@@ -1032,7 +1055,7 @@
92
 
        while (vp.y () < 0)
93
 
            vp.setY (screen->vpSize ().height () + vp.y ());
94
 
 
95
 
-       paintViewport (attrib, sTransform, region, output, mask, vp, vpCamPos, reflection);
96
 
+       paintViewport (attrib, sTransform, infiniteRegion, output, mask, vp, vpCamPos, reflection);
97
 
     }
98
 
 
99
 
     paintingDndWindow = false;
100
 
@@ -1205,7 +1228,7 @@
101
 
            }
102
 
        }
103
 
 
104
 
-       if ((vp == eScreen->paintingVp || window->onAllViewports ()) && !eScreen->paintingDndWindow)
105
 
+       if (vp == eScreen->paintingVp || window->onAllViewports ())
106
 
        {
107
 
            fA.setBrightness (fragment.getBrightness () * eScreen->vpBrightness);
108
 
            fA.setSaturation (fragment.getSaturation () * eScreen->vpSaturation);
109
 
@@ -1293,6 +1316,7 @@
110
 
        }
111
 
 
112
 
   }
113
 
+
114
 
   return status;
115
 
 
116
 
 }
117
 
@@ -1633,6 +1657,7 @@
118
 
     cWindow (CompositeWindow::get (w)),
119
 
     gWindow (GLWindow::get (w)),
120
 
     eScreen (ExpoScreen::get (screen)),
121
 
+    dndOpacity (0.0f),
122
 
     mGlowQuads (NULL)
123
 
 {
124
 
     CompositeWindowInterface::setHandler (cWindow, false);