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 <stefan@agner.ch>
This commit is contained in:
parent
3b1c1efe34
commit
1c1e4fdaf4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user