aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2019-01-23 20:29:28 +0100
committeremersion <contact@emersion.fr>2019-01-24 12:15:18 +0100
commit703a16007862e6289cbd70856f8b0549aacdf501 (patch)
tree30373ab472ac25716455c33d0e5400683e3f34c4
parent0040f7089f3d12cc8457790a9bd24a556a6f5a75 (diff)
data-control-v1: use new wlr_data_source API
-rw-r--r--types/wlr_data_control_v1.c7
1 files 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);
}