~ci-train-bot/unity/unity-ubuntu-artful-2892

« back to all changes in this revision

Viewing changes to lockscreen/BackgroundSettings.cpp

  • Committer: Bileto Bot
  • Author(s): Andrea Azzarone
  • Date: 2017-07-07 01:03:34 UTC
  • mfrom: (4245.1.1 fix-transparent-background)
  • Revision ID: ci-train-bot@canonical.com-20170707010334-wz0xhqxrriofhdg6
Lockscreen: always draw the background-color in the lockscreen

This is to avoid showing a transparent background if the background file is missing. (LP: #1702701)

Approved by: Marco Trevisan (Treviño)

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    bg_surface = gnome_bg_create_surface(gnome_bg, root_window, geo.width, geo.height, FALSE);
78
78
  }
79
79
 
 
80
  auto const& bg_color = settings.background_color();
 
81
  cairo_set_source_rgb(c, bg_color.red, bg_color.green, bg_color.blue);
 
82
  cairo_paint(c);
 
83
 
80
84
  if (bg_surface)
81
85
  {
82
86
    cairo_set_source_surface(c, bg_surface, 0, 0);
83
87
    cairo_paint(c);
84
88
    cairo_surface_destroy(bg_surface);
85
89
  }
86
 
  else
87
 
  {
88
 
    auto const& bg_color = settings.background_color();
89
 
    cairo_set_source_rgb(c, bg_color.red, bg_color.green, bg_color.blue);
90
 
    cairo_paint(c);
91
 
  }
92
90
 
93
91
  cairo_surface_set_device_scale(cairo_graphics.GetSurface(), scale, scale);
94
92