aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
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/drm
parent3497e53516d96ad67b26115e2e06218f68e1114d (diff)
Add wlr_signal_emit_safe
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/backend.c3
-rw-r--r--backend/drm/drm.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index 3782817c..4d09e078 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -11,6 +11,7 @@
#include <wlr/interfaces/wlr_output.h>
#include <wlr/types/wlr_list.h>
#include <wlr/util/log.h>
+#include <wlr/util/signal.h>
#include <wlr/render/egl.h>
#include "backend/drm/drm.h"
@@ -34,7 +35,7 @@ static void wlr_drm_backend_destroy(struct wlr_backend *backend) {
wlr_output_destroy(&conn->output);
}
- wl_signal_emit(&backend->events.destroy, backend);
+ wlr_signal_emit_safe(&backend->events.destroy, backend);
wl_list_remove(&drm->display_destroy.link);
wl_list_remove(&drm->session_signal.link);
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 56a78851..516eb405 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -18,6 +18,7 @@
#include <wlr/backend/interface.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/util/log.h>
+#include <wlr/util/signal.h>
#include <wlr/render/matrix.h>
#include <wlr/render/gles2.h>
#include <wlr/render.h>
@@ -870,7 +871,7 @@ void wlr_drm_scan_connectors(struct wlr_drm_backend *drm) {
wlr_conn->state = WLR_DRM_CONN_NEEDS_MODESET;
wlr_log(L_INFO, "Sending modesetting signal for '%s'",
wlr_conn->output.name);
- wl_signal_emit(&drm->backend.events.output_add, &wlr_conn->output);
+ wlr_signal_emit_safe(&drm->backend.events.output_add, &wlr_conn->output);
} else if (wlr_conn->state == WLR_DRM_CONN_CONNECTED &&
drm_conn->connection != DRM_MODE_CONNECTED) {
wlr_log(L_INFO, "'%s' disconnected", wlr_conn->output.name);
@@ -1014,7 +1015,7 @@ void wlr_drm_connector_cleanup(struct wlr_drm_connector *conn) {
case WLR_DRM_CONN_NEEDS_MODESET:
wlr_log(L_INFO, "Emitting destruction signal for '%s'",
conn->output.name);
- wl_signal_emit(&drm->backend.events.output_remove, &conn->output);
+ wlr_signal_emit_safe(&drm->backend.events.output_remove, &conn->output);
break;
case WLR_DRM_CONN_DISCONNECTED:
break;