Merge lp:~sil2100/compiz-core/cherry_3258 into lp:compiz-core

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: 3115
Proposed branch: lp:~sil2100/compiz-core/cherry_3258
Merge into: lp:compiz-core
Diff against target: 39 lines (+24/-3)
1 file modified
plugins/decor/src/decor.cpp (+24/-3)
To merge this branch: bzr merge lp:~sil2100/compiz-core/cherry_3258
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Review via email: mp+115145@code.launchpad.net

Commit message

Cherry-picked from compiz trunk (rev 3258):

Check if the window would actually paint before painting the shadow, since it is possible that another plugin could be inhibiting paint of the dock window. (LP: #1012956)

Description of the change

Just checking if it's possible for this to be included in an SRU as well.

Cherry-picked from compiz trunk (rev 3258):

Check if the window would actually paint before painting the shadow, since it is possible that another plugin could be inhibiting paint of the dock window. (LP: #1012956)

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yep, looks like the fix from upstream.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/decor/src/decor.cpp'
--- plugins/decor/src/decor.cpp 2012-06-15 16:41:34 +0000
+++ plugins/decor/src/decor.cpp 2012-07-16 13:52:52 +0000
@@ -195,11 +195,32 @@
195 {195 {
196 foreach (CompWindow *w, dScreen->cScreen->getWindowPaintList ())196 foreach (CompWindow *w, dScreen->cScreen->getWindowPaintList ())
197 {197 {
198 if ((w->type () & CompWindowTypeDockMask) &&198 bool isDock = w->type () & CompWindowTypeDockMask;
199 !(w->destroyed () || w->invisible ()))199 bool drawShadow = !(w->invisible () || w->destroyed ());
200
201 if (isDock && drawShadow)
200 {202 {
201 DecorWindow *d = DecorWindow::get (w);203 DecorWindow *d = DecorWindow::get (w);
202 d->glDecorate (transform, attrib, region, mask);204
205 /* If the last mask was an occlusion pass, glPaint
206 * return value will mean something different, so
207 * remove it */
208 unsigned int pmask = d->gWindow->lastMask () &
209 ~(PAINT_WINDOW_OCCLUSION_DETECTION_MASK);
210
211 /* Check if the window would draw by seeing if glPaint
212 * returns true when using PAINT_NO_CORE_INSTANCE_MASK
213 */
214 pmask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
215
216 if (d->gWindow->glPaint (d->gWindow->paintAttrib (),
217 transform,
218 region,
219 pmask))
220 {
221 GLFragment::Attrib fa (d->gWindow->paintAttrib ());
222 d->glDecorate (transform, fa, region, mask);
223 }
203 }224 }
204 }225 }
205 }226 }

Subscribers

People subscribed via source and target branches