diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-08-28 13:45:06 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-08-28 13:45:13 +0200 |
| commit | 00ee1cf98e3d8ef7cf71a9a505ba8d1382697e35 (patch) | |
| tree | dcee00193cee8d3be10494c0cace4003f845846e /src/protocols/core/DataDevice.cpp | |
| parent | 7dd0f76e5aa1e3726f9d9fd1871bc667237ef6a8 (diff) | |
data-device: send dndFinished when dnd offer is destroyed while unfinished
fixes #7496
see https://invent.kde.org/plasma/kwin/-/commit/711c5bb43f2823766d5189dc8d567c8f4cec253c
see https://bugs.kde.org/show_bug.cgi\?id\=482142
Diffstat (limited to 'src/protocols/core/DataDevice.cpp')
| -rw-r--r-- | src/protocols/core/DataDevice.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/protocols/core/DataDevice.cpp b/src/protocols/core/DataDevice.cpp index b7640af3..8c1a48d8 100644 --- a/src/protocols/core/DataDevice.cpp +++ b/src/protocols/core/DataDevice.cpp @@ -67,6 +67,13 @@ CWLDataOfferResource::CWLDataOfferResource(SP<CWlDataOffer> resource_, SP<IDataS }); } +CWLDataOfferResource::~CWLDataOfferResource() { + if (!source || !source->hasDnd() || dead) + return; + + source->sendDndFinished(); +} + bool CWLDataOfferResource::good() { return resource->resource(); } @@ -173,6 +180,7 @@ void CWLDataSourceResource::sendDndDropPerformed() { if (resource->version() < 3) return; resource->sendDndDropPerformed(); + dropped = true; } void CWLDataSourceResource::sendDndFinished() { |
