Also send drop when it was not accepted
This enables applications to distinguish - successful drop - drop onto client that didn't accept - cancelled drag
This commit is contained in:
parent
3a95c20279
commit
01a1aaf99e
1 changed files with 8 additions and 1 deletions
|
@ -258,7 +258,13 @@ void SeatInterfacePrivate::cancelDrag()
|
|||
drag.target->updateDragTarget(nullptr, 0);
|
||||
drag.target = nullptr;
|
||||
}
|
||||
endDrag();
|
||||
QObject::disconnect(drag.dragSourceDestroyConnection);
|
||||
if (drag.source) {
|
||||
drag.source->dndCancelled();
|
||||
}
|
||||
drag = Drag();
|
||||
Q_EMIT q->dragSurfaceChanged();
|
||||
Q_EMIT q->dragEnded();
|
||||
}
|
||||
|
||||
void SeatInterfacePrivate::endDrag()
|
||||
|
@ -274,6 +280,7 @@ void SeatInterfacePrivate::endDrag()
|
|||
dragTargetDevice->drop();
|
||||
dragSource->dropPerformed();
|
||||
} else {
|
||||
dragSource->dropPerformed();
|
||||
dragSource->dndCancelled();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue