From a39dc1f7a894b2ee761ae01af836e9b36b207928 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 18 Jan 2021 12:33:37 +0100 Subject: [PATCH] region: remove resource_list arg from region_create This is never used. --- types/wlr_compositor.c | 2 +- types/wlr_region.c | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c index 2bab57c6..ae4cc10e 100644 --- a/types/wlr_compositor.c +++ b/types/wlr_compositor.c @@ -131,7 +131,7 @@ static void compositor_create_surface(struct wl_client *client, static void compositor_create_region(struct wl_client *client, struct wl_resource *resource, uint32_t id) { - region_create(client, wl_resource_get_version(resource), id, NULL); + region_create(client, wl_resource_get_version(resource), id); } static const struct wl_compositor_interface compositor_impl = { diff --git a/types/wlr_region.c b/types/wlr_region.c index 6cdcf4e8..de14315d 100644 --- a/types/wlr_region.c +++ b/types/wlr_region.c @@ -35,15 +35,12 @@ static const struct wl_region_interface region_impl = { static void region_handle_resource_destroy(struct wl_resource *resource) { pixman_region32_t *reg = wlr_region_from_resource(resource); - - wl_list_remove(wl_resource_get_link(resource)); - pixman_region32_fini(reg); free(reg); } struct wl_resource *region_create(struct wl_client *client, - uint32_t version, uint32_t id, struct wl_list *resource_list) { + uint32_t version, uint32_t id) { pixman_region32_t *region = calloc(1, sizeof(pixman_region32_t)); if (region == NULL) { wl_client_post_no_memory(client); @@ -62,13 +59,6 @@ struct wl_resource *region_create(struct wl_client *client, wl_resource_set_implementation(region_resource, ®ion_impl, region, region_handle_resource_destroy); - struct wl_list *resource_link = wl_resource_get_link(region_resource); - if (resource_list != NULL) { - wl_list_insert(resource_list, resource_link); - } else { - wl_list_init(resource_link); - } - return region_resource; }