aboutsummaryrefslogtreecommitdiff
path: root/backend/headless/backend.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-02-12 09:12:31 +0100
committeremersion <contact@emersion.fr>2018-02-12 09:12:31 +0100
commit5e58d46cc1a90810e3ee76203cee8ca2f14fb462 (patch)
treea5019d87cdc121842ab7cf867fbcac0fde4ccff0 /backend/headless/backend.c
parent3497e53516d96ad67b26115e2e06218f68e1114d (diff)
Add wlr_signal_emit_safe
Diffstat (limited to 'backend/headless/backend.c')
-rw-r--r--backend/headless/backend.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/backend/headless/backend.c b/backend/headless/backend.c
index 0bf5ec28..7832b00c 100644
--- a/backend/headless/backend.c
+++ b/backend/headless/backend.c
@@ -2,6 +2,7 @@
#include <wlr/render/egl.h>
#include <wlr/render/gles2.h>
#include <wlr/util/log.h>
+#include <wlr/util/signal.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/interfaces/wlr_input_device.h>
#include "backend/headless.h"
@@ -16,14 +17,14 @@ static bool backend_start(struct wlr_backend *wlr_backend) {
wl_list_for_each(output, &backend->outputs, link) {
wl_event_source_timer_update(output->frame_timer, output->frame_delay);
wlr_output_update_enabled(&output->wlr_output, true);
- wl_signal_emit(&backend->backend.events.output_add,
+ wlr_signal_emit_safe(&backend->backend.events.output_add,
&output->wlr_output);
}
struct wlr_headless_input_device *input_device;
wl_list_for_each(input_device, &backend->input_devices,
wlr_input_device.link) {
- wl_signal_emit(&backend->backend.events.input_add,
+ wlr_signal_emit_safe(&backend->backend.events.input_add,
&input_device->wlr_input_device);
}
@@ -51,7 +52,7 @@ static void backend_destroy(struct wlr_backend *wlr_backend) {
wlr_input_device_destroy(&input_device->wlr_input_device);
}
- wl_signal_emit(&wlr_backend->events.destroy, backend);
+ wlr_signal_emit_safe(&wlr_backend->events.destroy, backend);
wlr_egl_finish(&backend->egl);
free(backend);