aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/selection.c b/selection.c
index 6e0d8d5a..6767f5fe 100644
--- a/selection.c
+++ b/selection.c
@@ -1777,6 +1777,7 @@ receive_dnd_done(void *user)
struct receive_offer_context *ctx = user;
wl_data_offer_finish(ctx->data_offer);
+ wl_data_offer_destroy(ctx->data_offer);
receive_offer_done(user);
}
@@ -1827,6 +1828,10 @@ drop(void *data, struct wl_data_device *wl_data_device)
? &receive_offer_uri
: &receive_offer_text),
&receive_dnd_done, ctx);
+
+ /* data offer is now “owned” by the receive context */
+ clipboard->data_offer = NULL;
+ clipboard->mime_type = DATA_OFFER_MIME_UNSET;
}
static void