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

« back to all changes in this revision

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

  • Committer: Sam Spilsbury
  • Date: 2011-10-07 16:09:42 UTC
  • Revision ID: sam.spilsbury@canonical.com-20111007160942-9zkw97vowa95galq
Added some new patches

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:06:59.998246191 +0800
 
5
+++ compiz-plugins-main-0.9.6/expo/src/expo.cpp 2011-10-08 00:07:17.022330628 +0800
 
6
@@ -444,7 +444,6 @@
 
7
     screen->handleEventSetEnabled (this, enable);
 
8
     cScreen->preparePaintSetEnabled (this, enable);
 
9
     cScreen->paintSetEnabled (this, enable);
 
10
-    cScreen->getWindowPaintListSetEnabled (this, false);
 
11
     cScreen->donePaintSetEnabled (this, enable);
 
12
     gScreen->glPaintOutputSetEnabled (this, enable);
 
13
     gScreen->glPaintTransformedOutputSetEnabled (this, enable);
 
14
@@ -784,12 +783,14 @@
 
15
                               DEFAULT_Z_CAMERA - curveDistance);
 
16
     }
 
17
 
 
18
-    cScreen->getWindowPaintListSetEnabled (this, paintingDndWindow);
 
19
+    if (paintingDndWindow)
 
20
+       cScreen->getWindowPaintListSetEnabled (this, true);
 
21
     gScreen->glPaintTransformedOutput (attrib, sTransform3,
 
22
                                       screen->region (), output,
 
23
                                       mask);
 
24
 
 
25
-    cScreen->getWindowPaintListSetEnabled (this, !paintingDndWindow);
 
26
+    if (paintingDndWindow)
 
27
+       cScreen->getWindowPaintListSetEnabled (this, false);
 
28
 
 
29
     if (!reflection && !paintingDndWindow)
 
30
     {
 
31
@@ -821,6 +822,8 @@
 
32
     invertTransformedVertex (attrib, sTransform3, output, br);
 
33
 
 
34
     viewport_size = CompSize (br[0] - tl[0], br[1] - tl[1]);
 
35
+
 
36
+    cScreen->setWindowPaintOffset (0, 0);
 
37
 }
 
38
 
 
39
 void
 
40
@@ -1105,8 +1108,6 @@
 
41
 
 
42
     expoActive = false;
 
43
 
 
44
-    cScreen->setWindowPaintOffset (0, 0);
 
45
-
 
46
     gScreen->glPaintTransformedOutputSetCurrentIndex (glPaintTransformedOutputIndex);
 
47
     gScreen->setTextureFilter (oldFilter);
 
48
 }
 
49
@@ -1437,16 +1438,15 @@
 
50
 {
 
51
     GLMatrix            wTransform (transform);
 
52
     GLWindowPaintAttrib wAttrib (attrib);
 
53
-    CompPoint           vp;
 
54
     CompRegion          clip (region);
 
55
 
 
56
-    screen->viewportForGeometry (window->geometry (), vp);
 
57
-
 
58
     if (eScreen->expoActive)
 
59
     {
 
60
-       float opacity = 1.0;
 
61
-       bool  hide;
 
62
-       bool  zoomAnim;
 
63
+       float     opacity = 1.0;
 
64
+       bool      hide;
 
65
+       bool      zoomAnim;
 
66
+       CompPoint vp;
 
67
+       screen->viewportForGeometry (window->geometry (), vp);
 
68
 
 
69
        zoomAnim = eScreen->optionGetExpoAnimation () ==
 
70
                   ExpoScreen::ExpoAnimationZoom;
 
71
@@ -1477,39 +1477,40 @@
 
72
            mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
 
73
        else
 
74
            wAttrib.opacity = wAttrib.opacity * opacity;
 
75
-    }
 
76
 
 
77
-    /* Stretch maximized windows a little so that you don't
 
78
-     * have an awkward gap */
 
79
+       /* Stretch maximized windows a little so that you don't
 
80
+        * have an awkward gap */
 
81
 
 
82
-    if (window->state () & MAXIMIZE_STATE)
 
83
-    {
 
84
-       CompOutput *o = &screen->outputDevs ()[screen->outputDeviceForGeometry(window->geometry())];
 
85
-       float yS = 1.0 + ((o->height () / (float) window->height ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
 
86
-       wTransform.translate (window->x () + window->width () / 2,
 
87
-                             window->y () + window->height (),
 
88
-                             0.0f);
 
89
-       wTransform.scale (1.0f, yS, 1.0f);
 
90
-       wTransform.translate (-(window->x () + window->width () / 2),
 
91
-                             -(window->y () + window->height ()),
 
92
-                             0.0f);
 
93
+       if (window->state () & MAXIMIZE_STATE &&
 
94
+               !window->border ().top)
 
95
+       {
 
96
+           CompOutput *o = &screen->outputDevs ()[screen->outputDeviceForGeometry(window->geometry())];
 
97
+           float yS = 1.0 + ((o->height () / (float) window->height ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
 
98
+           wTransform.translate (window->x () + window->width () / 2,
 
99
+                                 window->y () + window->height (),
 
100
+                                 0.0f);
 
101
+           wTransform.scale (1.0f, yS, 1.0f);
 
102
+           wTransform.translate (-(window->x () + window->width () / 2),
 
103
+                                 -(window->y () + window->height ()),
 
104
+                                 0.0f);
 
105
 
 
106
-       if (eScreen->paintingVp != vp)
 
107
-           mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
 
108
+           if (eScreen->paintingVp != vp)
 
109
+               mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
 
110
 
 
111
-       mask |= PAINT_WINDOW_TRANSFORMED_MASK;
 
112
-    }
 
113
-       
 
114
-    if (std::find (eScreen->dndWindows.begin(), eScreen->dndWindows.end (), window) != eScreen->dndWindows.end ())
 
115
-    {
 
116
-       if (!eScreen->paintingDndWindow)
 
117
-       {
 
118
-           mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
 
119
+           mask |= PAINT_WINDOW_TRANSFORMED_MASK;
 
120
        }
 
121
-       else
 
122
+       
 
123
+       if (std::find (eScreen->dndWindows.begin(), eScreen->dndWindows.end (), window) != eScreen->dndWindows.end ())
 
124
        {
 
125
-           mask |= PAINT_WINDOW_TRANSFORMED_MASK;
 
126
-           clip = infiniteRegion;
 
127
+           if (!eScreen->paintingDndWindow)
 
128
+           {
 
129
+               mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
 
130
+           }
 
131
+           else
 
132
+           {
 
133
+               mask |= PAINT_WINDOW_TRANSFORMED_MASK;
 
134
+               clip = infiniteRegion;
 
135
+           }
 
136
        }
 
137
     }
 
138