aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-04-26 00:11:36 +0100
committeremersion <contact@emersion.fr>2018-04-26 00:11:36 +0100
commit449f06556aa9550540c37af0cae0d6902b29f204 (patch)
tree9c61f8e9b5a463f5f320ac203b1e2615585c348f /render
parentd47713ac0f28e9dcc85f8aa40a0372381730d43b (diff)
Destroy wlr_surface with wlr_renderer
Diffstat (limited to 'render')
-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 {