Merge lp:~smspillaz/compiz-core/compiz-core.fix_987639 into lp:compiz-core/0.9.8

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 3114
Proposed branch: lp:~smspillaz/compiz-core/compiz-core.fix_987639
Merge into: lp:compiz-core/0.9.8
Diff against target: 50 lines (+15/-18)
1 file modified
plugins/decor/src/decor.cpp (+15/-18)
To merge this branch: bzr merge lp:~smspillaz/compiz-core/compiz-core.fix_987639
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Alan Griffiths Approve
Review via email: mp+103300@code.launchpad.net

Description of the change

== Problem ==

See LP#987639 - decorations would be clipped by paint region but this is incorrect

== Solution ==

Checked with older versions, they should indeed always use infiniteRegion in the case of transformed windows.

== test ==

Already covered.

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

LGTM

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Looks OK, and confirmed the fix works.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/decor/src/decor.cpp'
2--- plugins/decor/src/decor.cpp 2012-04-23 05:36:16 +0000
3+++ plugins/decor/src/decor.cpp 2012-04-24 14:37:25 +0000
4@@ -223,31 +223,28 @@
5
6 const CompRegion *preg = NULL;
7
8- if (mClipGroup)
9+ if ((mask & (PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK |
10+ PAINT_WINDOW_WITH_OFFSET_MASK)))
11+ preg = &region;
12+ else if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
13+ preg = &infiniteRegion;
14+ else if (mClipGroup)
15 {
16- if ((mask & (PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK |
17- PAINT_WINDOW_WITH_OFFSET_MASK)))
18+ tmpRegion = mOutputRegion;
19+ tmpRegion &= region;
20+
21+ if (tmpRegion.isEmpty ())
22 preg = &region;
23- else if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
24- preg = &infiniteRegion;
25 else
26- {
27- tmpRegion = mOutputRegion;
28- tmpRegion &= region;
29-
30- if (tmpRegion.isEmpty ())
31- preg = &region;
32- else
33- preg = &shadowRegion;
34- }
35-
36- /* In case some plugin needs to paint us with an offset region */
37- if (preg->isEmpty ())
38- preg = &region;
39+ preg = &shadowRegion;
40 }
41 else
42 preg = &region;
43
44+ /* In case some plugin needs to paint us with an offset region */
45+ if (preg->isEmpty ())
46+ preg = &region;
47+
48 const CompRegion &reg (*preg);
49
50 gWindow->geometry ().reset ();

Subscribers

People subscribed via source and target branches