Merge lp:~compiz-team/compiz-expo-plugin/oneiric.fix_868121 into lp:~compiz-team/compiz-expo-plugin/oneiric

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 156
Proposed branch: lp:~compiz-team/compiz-expo-plugin/oneiric.fix_868121
Merge into: lp:~compiz-team/compiz-expo-plugin/oneiric
Diff against target: 140 lines (+44/-43)
1 file modified
src/expo.cpp (+44/-43)
To merge this branch: bzr merge lp:~compiz-team/compiz-expo-plugin/oneiric.fix_868121
Reviewer Review Type Date Requested Status
Robert Carr (community) Approve
Review via email: mp+78581@code.launchpad.net

Description of the change

Fix bug 868121

Ensure that windows are always painted at least once, make sure state is set and unset at the right points.

To post a comment you must log in.
Revision history for this message
Robert Carr (robertcarr) wrote :

+1

review: Approve

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: