wayland: Send dnd_cancelled to source before data_device.leave to target
Otherwise it is harder for clients to detect an actual cancellation when dragging to itself.
This commit is contained in:
parent
856925bcc3
commit
df60eef0db
1 changed files with 4 additions and 4 deletions
|
@ -255,14 +255,14 @@ void SeatInterfacePrivate::registerPrimarySelectionDevice(PrimarySelectionDevice
|
||||||
|
|
||||||
void SeatInterfacePrivate::cancelDrag()
|
void SeatInterfacePrivate::cancelDrag()
|
||||||
{
|
{
|
||||||
if (drag.target) {
|
|
||||||
drag.target->updateDragTarget(nullptr, 0);
|
|
||||||
drag.target = nullptr;
|
|
||||||
}
|
|
||||||
QObject::disconnect(drag.dragSourceDestroyConnection);
|
QObject::disconnect(drag.dragSourceDestroyConnection);
|
||||||
if (drag.source) {
|
if (drag.source) {
|
||||||
drag.source->dndCancelled();
|
drag.source->dndCancelled();
|
||||||
}
|
}
|
||||||
|
if (drag.target) {
|
||||||
|
drag.target->updateDragTarget(nullptr, 0);
|
||||||
|
drag.target = nullptr;
|
||||||
|
}
|
||||||
drag = Drag();
|
drag = Drag();
|
||||||
Q_EMIT q->dragSurfaceChanged();
|
Q_EMIT q->dragSurfaceChanged();
|
||||||
Q_EMIT q->dragEnded();
|
Q_EMIT q->dragEnded();
|
||||||
|
|
Loading…
Reference in a new issue