Commit 1c1e4fda authored by Stefan Agner's avatar Stefan Agner Committed by Daniel Stone

desktop-shell: always paint background color first

Only draw the background once, using the the current default
background color or the user specified background color.

This allows for non-filling background image implemenation
while still using the specified background color.
Signed-off-by: Stefan Agner's avatarStefan Agner <stefan@agner.ch>
parent 3b1c1efe
......@@ -756,7 +756,10 @@ background_draw(struct widget *widget, void *data)
cr = widget_cairo_create(background->widget);
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_rgba(cr, 0.0, 0.0, 0.2, 1.0);
if (background->color == 0)
cairo_set_source_rgba(cr, 0.0, 0.0, 0.2, 1.0);
else
set_hex_color(cr, background->color);
cairo_paint(cr);
widget_get_allocation(widget, &allocation);
......@@ -802,8 +805,6 @@ background_draw(struct widget *widget, void *data)
cairo_set_source(cr, pattern);
cairo_pattern_destroy (pattern);
cairo_surface_destroy(image);
} else {
set_hex_color(cr, background->color);
}
cairo_paint(cr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment