mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 04:53:48 -07:00
data-device: send dndFinished when dnd offer is destroyed while unfinished
fixes #7496
see 711c5bb43f
see https://bugs.kde.org/show_bug.cgi\?id\=482142
This commit is contained in:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user