aboutsummaryrefslogtreecommitdiff
path: root/rootston/desktop.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-10-21 12:35:51 +0200
committeremersion <contact@emersion.fr>2017-10-21 12:35:51 +0200
commitc8570d0e426c60fb66fba4ccc8e74af73933e615 (patch)
tree7810f3a64f3f16ea1ae094593684561c564a77d1 /rootston/desktop.c
parent1782d5e7b7dc5e494cfee72b758d5fa8114aecc8 (diff)
Remove wl_list_init when using wl_signal_add
Diffstat (limited to 'rootston/desktop.c')
-rw-r--r--rootston/desktop.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c
index 641315a8..bf556131 100644
--- a/rootston/desktop.c
+++ b/rootston/desktop.c
@@ -203,16 +203,15 @@ struct roots_view *view_at(struct roots_desktop *desktop, double lx, double ly,
struct roots_desktop *desktop_create(struct roots_server *server,
struct roots_config *config) {
struct roots_desktop *desktop = calloc(1, sizeof(struct roots_desktop));
+ assert(desktop);
wlr_log(L_DEBUG, "Initializing roots desktop");
assert(desktop->views = list_create());
wl_list_init(&desktop->outputs);
- wl_list_init(&desktop->output_add.link);
- desktop->output_add.notify = output_add_notify;
- wl_list_init(&desktop->output_remove.link);
- desktop->output_remove.notify = output_remove_notify;
+ desktop->output_add.notify = output_add_notify;
wl_signal_add(&server->backend->events.output_add, &desktop->output_add);
+ desktop->output_remove.notify = output_remove_notify;
wl_signal_add(&server->backend->events.output_remove,
&desktop->output_remove);