forked from external/yambar
particle/string: expand on_click handler before passing to exposable
This commit is contained in:
parent
aee4805df8
commit
85801a5deb
1 changed files with 7 additions and 2 deletions
|
@ -87,12 +87,17 @@ instantiate(const struct particle *particle, const struct tag_set *tags)
|
|||
e->font = p->font;
|
||||
e->foreground = p->foreground;
|
||||
|
||||
struct exposable *exposable = exposable_common_new(
|
||||
particle, particle->on_click_template);
|
||||
char *on_click = particle->on_click_template != NULL
|
||||
? tags_expand_template(particle->on_click_template, tags)
|
||||
: NULL;
|
||||
|
||||
struct exposable *exposable = exposable_common_new(particle, on_click);
|
||||
exposable->private = e;
|
||||
exposable->destroy = &exposable_destroy;
|
||||
exposable->begin_expose = &begin_expose;
|
||||
exposable->expose = &expose;
|
||||
|
||||
free(on_click);
|
||||
return exposable;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue