diff options
author | Harish Krupo <harishkrupo@gmail.com> | 2019-04-19 22:06:44 +0530 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-06-19 07:44:51 +0000 |
commit | f76cf8a5b775c637657c0bfbd7334e46001ac405 (patch) | |
tree | 6964e7b46f00a4c04c0b3ddbff4cd3160af591bd | |
parent | 2e5ad9252e0ba20c5c547552788fb6ac585c2a84 (diff) | |
download | weston-f76cf8a5b775c637657c0bfbd7334e46001ac405.tar.gz |
Fix: clients/window: Premature finish request when copy-pasting
As per the wl_data_offer::finish documentation, the request is only
valid for drag n drop operations and signifies that a dnd is completed.
Send finish request only when we have a dnd operation active.
Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
(cherry picked from commit 43152a3a8fa1e3164db33ac7ace105186c5e8ac8)
-rw-r--r-- | clients/window.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clients/window.c b/clients/window.c index 49549f62..00592cbf 100644 --- a/clients/window.c +++ b/clients/window.c @@ -3922,8 +3922,9 @@ offer_io_func(struct task *task, uint32_t events) offer->x, offer->y, offer->user_data); if (len == 0) { - if (display->data_device_manager_version >= - WL_DATA_OFFER_FINISH_SINCE_VERSION) + if ((offer != offer->input->selection_offer) && + (display->data_device_manager_version >= + WL_DATA_OFFER_FINISH_SINCE_VERSION)) wl_data_offer_finish(offer->offer); close(offer->fd); data_offer_destroy(offer); |