From 449f06556aa9550540c37af0cae0d6902b29f204 Mon Sep 17 00:00:00 2001 From: emersion Date: Thu, 26 Apr 2018 00:11:36 +0100 Subject: Destroy wlr_surface with wlr_renderer --- render/wlr_renderer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'render') 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 #include #include +#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 { -- cgit v1.2.3