region: remove resource_list arg from region_create

This is never used.
This commit is contained in:
Simon Ser 2021-01-18 12:33:37 +01:00
parent 45f992b27b
commit a39dc1f7a8
2 changed files with 2 additions and 12 deletions

View File

@ -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 = {

View File

@ -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;
}