mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 04:25:42 +02:00
module/xkb: use module common constructor/destructor
This commit is contained in:
parent
20cb0f0de7
commit
f8cb3acc35
1 changed files with 2 additions and 6 deletions
|
@ -48,7 +48,7 @@ destroy(struct module *mod)
|
|||
m->label->destroy(m->label);
|
||||
free_layouts(m->layouts);
|
||||
free(m);
|
||||
free(mod);
|
||||
module_default_destroy(mod);
|
||||
}
|
||||
|
||||
static struct exposable *
|
||||
|
@ -453,14 +453,10 @@ module_xkb(struct particle *label)
|
|||
m->layouts.count = 0;
|
||||
m->layouts.layouts = NULL;
|
||||
|
||||
struct module *mod = malloc(sizeof(*mod));
|
||||
mod->bar = NULL;
|
||||
struct module *mod = module_common_new();
|
||||
mod->private = m;
|
||||
mod->run = &run;
|
||||
mod->destroy = &destroy;
|
||||
mod->content = &content;
|
||||
mod->begin_expose = &module_default_begin_expose;
|
||||
mod->expose = &module_default_expose;
|
||||
mod->end_expose = &module_default_end_expose;
|
||||
return mod;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue