Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 597ba2b

Browse files
emersionifreund
authored andcommitted
surface: add addon set
1 parent 211b3b7 commit 597ba2b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/wlr/types/wlr_surface.h

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <time.h>
1616
#include <wayland-server-core.h>
1717
#include <wlr/types/wlr_output.h>
18+
#include <wlr/util/addon.h>
1819
#include <wlr/util/box.h>
1920

2021
enum wlr_surface_state_field {
@@ -141,6 +142,7 @@ struct wlr_surface {
141142

142143
struct wl_list current_outputs; // wlr_surface_output::link
143144

145+
struct wlr_addon_set addons;
144146
void *data;
145147

146148
// private state

types/wlr_surface.c

+3
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,8 @@ static void surface_handle_resource_destroy(struct wl_resource *resource) {
693693

694694
wlr_signal_emit_safe(&surface->events.destroy, surface);
695695

696+
wlr_addon_set_finish(&surface->addons);
697+
696698
struct wlr_surface_state *cached, *cached_tmp;
697699
wl_list_for_each_safe(cached, cached_tmp, &surface->cached, cached_state_link) {
698700
surface_state_destroy_cached(cached);
@@ -750,6 +752,7 @@ struct wlr_surface *surface_create(struct wl_client *client,
750752
pixman_region32_init(&surface->buffer_damage);
751753
pixman_region32_init(&surface->opaque_region);
752754
pixman_region32_init(&surface->input_region);
755+
wlr_addon_set_init(&surface->addons);
753756

754757
wl_signal_add(&renderer->events.destroy, &surface->renderer_destroy);
755758
surface->renderer_destroy.notify = surface_handle_renderer_destroy;

0 commit comments

Comments
 (0)