Merge lp:~azzar1/unity/fix-transparent-background into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 4246
Proposed branch: lp:~azzar1/unity/fix-transparent-background
Merge into: lp:unity
Diff against target: 25 lines (+4/-6)
1 file modified
lockscreen/BackgroundSettings.cpp (+4/-6)
To merge this branch: bzr merge lp:~azzar1/unity/fix-transparent-background
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+326938@code.launchpad.net

Commit message

Lockscreen: always draw the background-color in the lockscreen

This is to avoid showing a transparent background if the background file is missing.

Description of the change

Always draw the background-color in the lockscreen to avoid showing a transparent background.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lockscreen/BackgroundSettings.cpp'
2--- lockscreen/BackgroundSettings.cpp 2017-02-22 01:03:39 +0000
3+++ lockscreen/BackgroundSettings.cpp 2017-07-06 14:49:14 +0000
4@@ -77,18 +77,16 @@
5 bg_surface = gnome_bg_create_surface(gnome_bg, root_window, geo.width, geo.height, FALSE);
6 }
7
8+ auto const& bg_color = settings.background_color();
9+ cairo_set_source_rgb(c, bg_color.red, bg_color.green, bg_color.blue);
10+ cairo_paint(c);
11+
12 if (bg_surface)
13 {
14 cairo_set_source_surface(c, bg_surface, 0, 0);
15 cairo_paint(c);
16 cairo_surface_destroy(bg_surface);
17 }
18- else
19- {
20- auto const& bg_color = settings.background_color();
21- cairo_set_source_rgb(c, bg_color.red, bg_color.green, bg_color.blue);
22- cairo_paint(c);
23- }
24
25 cairo_surface_set_device_scale(cairo_graphics.GetSurface(), scale, scale);
26