region: remove resource_list arg from region_create

This is never used.
master
Simon Ser 4 years ago
parent 45f992b27b
commit a39dc1f7a8

@ -131,7 +131,7 @@ static void compositor_create_surface(struct wl_client *client,
static void compositor_create_region(struct wl_client *client, static void compositor_create_region(struct wl_client *client,
struct wl_resource *resource, uint32_t id) { 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 = { static const struct wl_compositor_interface compositor_impl = {

@ -35,15 +35,12 @@ static const struct wl_region_interface region_impl = {
static void region_handle_resource_destroy(struct wl_resource *resource) { static void region_handle_resource_destroy(struct wl_resource *resource) {
pixman_region32_t *reg = wlr_region_from_resource(resource); pixman_region32_t *reg = wlr_region_from_resource(resource);
wl_list_remove(wl_resource_get_link(resource));
pixman_region32_fini(reg); pixman_region32_fini(reg);
free(reg); free(reg);
} }
struct wl_resource *region_create(struct wl_client *client, 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)); pixman_region32_t *region = calloc(1, sizeof(pixman_region32_t));
if (region == NULL) { if (region == NULL) {
wl_client_post_no_memory(client); 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, wl_resource_set_implementation(region_resource, &region_impl, region,
region_handle_resource_destroy); 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; return region_resource;
} }

Loading…
Cancel
Save