aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Primak <vyivel@posteo.net>2021-08-09 20:18:31 +0300
committerSimon Ser <contact@emersion.fr>2021-08-10 19:15:48 +0200
commit11f799e88e6d652d58b4becd96b18eadd631f5d1 (patch)
tree286ef0d1b9672e673f94f2436681cb31e85a9acd
parenta6a80850b729eefaafac325256023ee92b21be34 (diff)
wlr_outputs: add wlr_addon_set
-rw-r--r--include/wlr/types/wlr_output.h3
-rw-r--r--types/wlr_output.c3
2 files changed, 6 insertions, 0 deletions
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 <wayland-util.h>
#include <wlr/render/dmabuf.h>
#include <wlr/types/wlr_buffer.h>
+#include <wlr/util/addon.h>
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