wlr_mirror: replace wlr_output->mirror_dst with wlr_addon

This commit is contained in:
Alexander Courtis 2022-01-10 11:50:40 +11:00
parent 392dde7bed
commit eac618687b
5 changed files with 53 additions and 6 deletions

View file

@ -45,3 +45,16 @@ struct wlr_addon *wlr_addon_find(struct wlr_addon_set *set, const void *owner,
}
return NULL;
}
void wlr_addon_find_all(struct wl_array *all, struct wlr_addon_set *set,
const struct wlr_addon_interface *impl) {
wl_array_init(all);
struct wlr_addon *addon;
wl_list_for_each(addon, &set->addons, link) {
if (addon->impl == impl) {
struct wlr_addon **addon_ptr = wl_array_add(all, sizeof(addon_ptr));
*addon_ptr = addon;
}
}
}