Merge lp:~vanvugt/unity/fix-1011120 into lp:unity

Proposed by Daniel van Vugt
Status: Merged
Approved by: Sam Spilsbury
Approved revision: no longer in the source branch.
Merged at revision: 2847
Proposed branch: lp:~vanvugt/unity/fix-1011120
Merge into: lp:unity
Diff against target: 73 lines (+14/-4)
2 files modified
plugins/unityshell/src/unityshell.cpp (+13/-4)
plugins/unityshell/src/unityshell.h (+1/-0)
To merge this branch: bzr merge lp:~vanvugt/unity/fix-1011120
Reviewer Review Type Date Requested Status
Sam Spilsbury (community) Approve
PS Jenkins bot continuous-integration Pending
Marco Trevisan (Treviño) Pending
Daniel van Vugt Pending
Review via email: mp+129104@code.launchpad.net

This proposal supersedes a proposal from 2012-09-30.

Commit message

Keep the panel shadow attached to the panel at all times. Even under screen
transformations like the cube plugin.
(LP: #1011120)

Also fixes other panel shadow bugs (LP: #1061338) and (LP: #1061339)

Description of the change

See commit message.

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

This code is correct - do we know if design wanted the panel shadow to be painted on top of the workspace switcher as well or should it still be hidden in that case? (Naturally, it looks better, but I'm not sure what the spec is).

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

The Panel's shadow should IMHO be drawn if the Panel itself is drawn and should always stick with the Panel.

Great to see this nasty bug finally fixed, although what remains of the Cube is only a shadow of its former self in modern GLES Compiz (no 3d windows, no cube reflection and deformation, solid top and bottom caps).

+1 for this fix though.

review: Approve
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote : Posted in a previous version of this proposal

Nice

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote : Posted in a previous version of this proposal

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1421/console reported an error when processing this lp:~vanvugt/unity/fix-1011120 branch.
Not merging it.

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

Added the old ugliness back in so there's no visible difference and we don't need to ask design.

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

Fixing conflicts that have just appeared in lp:unity

review: Needs Fixing
Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/unityshell.cpp'
2--- plugins/unityshell/src/unityshell.cpp 2012-10-10 18:10:34 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2012-10-11 07:28:19 +0000
4@@ -584,10 +584,13 @@
5
6 CompRegion redraw(clip);
7 redraw &= shadowRect;
8+ redraw -= panelShadowPainted;
9
10 if (redraw.isEmpty())
11 return;
12
13+ panelShadowPainted |= redraw;
14+
15 // compiz doesn't use the same method of tracking monitors as our toolkit
16 // we need to make sure we properly associate with the right monitor
17 int current_monitor = -1;
18@@ -1323,7 +1326,7 @@
19 {
20 allowWindowPaint = false;
21 gScreen->glPaintTransformedOutput(attrib, transform, region, output, mask);
22-
23+ paintPanelShadow(region);
24 }
25
26 void UnityScreen::preparePaint(int ms)
27@@ -1337,6 +1340,7 @@
28 wi->HandleAnimations (ms);
29
30 didShellRepaint = false;
31+ panelShadowPainted = CompRegion();
32 firstWindowAboveShell = NULL;
33 }
34
35@@ -2524,18 +2528,23 @@
36 uScreen->paintDisplay();
37 }
38
39- if (window->type() == CompWindowTypeDesktopMask)
40+ bool screen_transformed = (mask & PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK);
41+
42+ if (window->type() == CompWindowTypeDesktopMask && !screen_transformed)
43 uScreen->setPanelShadowMatrix(matrix);
44
45 Window active_window = screen->activeWindow();
46- if (window->id() == active_window && window->type() != CompWindowTypeDesktopMask)
47+ if (!screen_transformed &&
48+ window->id() == active_window &&
49+ window->type() != CompWindowTypeDesktopMask)
50 {
51 uScreen->paintPanelShadow(region);
52 }
53
54 bool ret = gWindow->glDraw(matrix, attrib, region, mask);
55
56- if ((active_window == 0 || active_window == window->id()) &&
57+ if (!screen_transformed &&
58+ (active_window == 0 || active_window == window->id()) &&
59 (window->type() == CompWindowTypeDesktopMask))
60 {
61 uScreen->paintPanelShadow(region);
62
63=== modified file 'plugins/unityshell/src/unityshell.h'
64--- plugins/unityshell/src/unityshell.h 2012-10-10 18:10:34 +0000
65+++ plugins/unityshell/src/unityshell.h 2012-10-11 07:28:19 +0000
66@@ -303,6 +303,7 @@
67 bool _key_nav_mode_requested;
68 CompOutput* _last_output;
69
70+ CompRegion panelShadowPainted;
71 CompRegion nuxRegion;
72 CompRegion fullscreenRegion;
73 CompWindow* firstWindowAboveShell;