From 703a16007862e6289cbd70856f8b0549aacdf501 Mon Sep 17 00:00:00 2001 From: emersion Date: Wed, 23 Jan 2019 20:29:28 +0100 Subject: [PATCH] data-control-v1: use new wlr_data_source API --- types/wlr_data_control_v1.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/types/wlr_data_control_v1.c b/types/wlr_data_control_v1.c index 930675c3..e06b9e63 100644 --- a/types/wlr_data_control_v1.c +++ b/types/wlr_data_control_v1.c @@ -32,11 +32,10 @@ static void client_source_send(struct wlr_data_source *wlr_source, close(fd); } -static void client_source_cancel(struct wlr_data_source *wlr_source) { +static void client_source_destroy(struct wlr_data_source *wlr_source) { struct client_data_source *source = client_data_source_from_source(wlr_source); zwlr_data_control_source_v1_send_cancelled(source->resource); - wlr_data_source_finish(wlr_source); // Make the resource inert wl_resource_set_user_data(source->resource, NULL); free(source); @@ -44,7 +43,7 @@ static void client_source_cancel(struct wlr_data_source *wlr_source) { static const struct wlr_data_source_impl client_source_impl = { .send = client_source_send, - .cancel = client_source_cancel, + .destroy = client_source_destroy, }; static const struct zwlr_data_control_source_v1_interface source_impl; @@ -101,7 +100,7 @@ static void source_handle_resource_destroy(struct wl_resource *resource) { if (source == NULL) { return; } - wlr_data_source_cancel(&source->source); + wlr_data_source_destroy(&source->source); }