diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index dd4b4c0f..8363261d 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -16,6 +16,7 @@ #include #include #include +#include struct wlr_output_mode { int32_t width, height; @@ -184,6 +185,8 @@ struct wlr_output { struct wl_listener display_destroy; + struct wlr_addon_set addons; + void *data; }; diff --git a/types/wlr_output.c b/types/wlr_output.c index 394f82cd..741ecf0b 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -376,6 +376,8 @@ void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend, output->software_cursor_locks = 1; } + wlr_addon_set_init(&output->addons); + output->display_destroy.notify = handle_display_destroy; wl_display_add_destroy_listener(display, &output->display_destroy); } @@ -395,6 +397,7 @@ void wlr_output_destroy(struct wlr_output *output) { output_clear_back_buffer(output); wlr_signal_emit_safe(&output->events.destroy, output); + wlr_addon_set_finish(&output->addons); // The backend is responsible for free-ing the list of modes