Merge lp:~townsend/unity/fix-lp1179210 into lp:unity

Proposed by Christopher Townsend
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 3594
Proposed branch: lp:~townsend/unity/fix-lp1179210
Merge into: lp:unity
Diff against target: 28 lines (+6/-6)
1 file modified
launcher/Launcher.cpp (+6/-6)
To merge this branch: bzr merge lp:~townsend/unity/fix-lp1179210
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+194415@code.launchpad.net

Commit message

In low graphics mode, only draw the Launcher background as needed instead of all of the time, even if the Launcher is hidden.

Description of the change

= Issue =
When using low graphics and the Launcher is hidden, the background color of the Launcher is always drawn on the screen causing an ugly artefact.

= Fix =
Instead of always drawing the background, only draw the background as needed in the same manner as the normal graphic mode does it.

= Test =
Restart Unity in low graphics mode by doing this: UNITY_LOW_GFX_MODE=1 setsid unity

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

right, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/Launcher.cpp'
2--- launcher/Launcher.cpp 2013-10-29 22:39:42 +0000
3+++ launcher/Launcher.cpp 2013-11-07 20:35:55 +0000
4@@ -1639,12 +1639,6 @@
5
6 nux::Color clear_colour = nux::Color(0x00000000);
7
8- if (Settings::Instance().GetLowGfxMode())
9- {
10- clear_colour = options()->background_color;
11- clear_colour.alpha = 1.0f;
12- }
13-
14 // clear region
15 GfxContext.PushClippingRectangle(base);
16 gPainter.PushDrawColorLayer(GfxContext, base, clear_colour, true, ROP);
17@@ -1777,6 +1771,12 @@
18 gPainter.Paint2DQuadColor(GfxContext, bkg_box, color);
19 }
20 }
21+ else
22+ {
23+ nux::Color color = options()->background_color;
24+ color.alpha = 1.0f;
25+ gPainter.Paint2DQuadColor(GfxContext, bkg_box, color);
26+ }
27
28 GfxContext.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER);
29