aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-01-18 12:33:37 +0100
committerSimon Ser <contact@emersion.fr>2021-02-02 23:42:53 +0100
commita39dc1f7a894b2ee761ae01af836e9b36b207928 (patch)
treecdb8b11d45fdb2b5ef38b2a7d0e57e733aac0150
parent45f992b27b7a8f74dd5b05e9961dead25bb7a248 (diff)
region: remove resource_list arg from region_create
This is never used.
-rw-r--r--types/wlr_compositor.c2
-rw-r--r--types/wlr_region.c12
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, &region_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;
}