aboutsummaryrefslogtreecommitdiff
path: root/render/wlr_renderer.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/wlr_renderer.c')
-rw-r--r--render/wlr_renderer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c
index 700da05b..8d1bd9ce 100644
--- a/render/wlr_renderer.c
+++ b/render/wlr_renderer.c
@@ -5,6 +5,7 @@
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_matrix.h>
#include <wlr/util/log.h>
+#include "util/signal.h"
void wlr_renderer_init(struct wlr_renderer *renderer,
const struct wlr_renderer_impl *impl) {
@@ -18,9 +19,13 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
assert(impl->format_supported);
assert(impl->texture_from_pixels);
renderer->impl = impl;
+
+ wl_signal_init(&renderer->events.destroy);
}
void wlr_renderer_destroy(struct wlr_renderer *r) {
+ wlr_signal_emit_safe(&r->events.destroy, r);
+
if (r && r->impl && r->impl->destroy) {
r->impl->destroy(r);
} else {