particle: add utility function to render a particle's decoration

This commit is contained in:
Daniel Eklöf 2018-12-29 21:00:03 +01:00
parent 6f5572ff6b
commit 22507ae26c
8 changed files with 21 additions and 20 deletions

View file

@ -41,11 +41,9 @@ begin_expose(struct exposable *exposable, cairo_t *cr)
static void
expose(const struct exposable *exposable, cairo_t *cr, int x, int y, int height)
{
const struct deco *deco = exposable->particle->deco;
if (deco != NULL)
deco->expose(deco, cr, x, y, exposable->width, height);
struct eprivate *e = exposable->private;
exposable_render_deco(exposable, cr, x, y, height);
e->exposable->expose(
e->exposable, cr, x + exposable->particle->left_margin, y, height);
}