Fix xwayland DND crash

Drag and drop objects slightly outlive wayland's DND concept as we have
to cancel the client and wait for a response.

This normally is fine, except in the case that the drag ended because
the sender quit.

Calling setWlSource on drag ends creates a matching pair with
Dnd::startDrag where we first set the source and has parralels with
clipboard.

Selection::handleSelectionRequest checks for the presence of a source.

I could not reproduce the original bug.

BUG: 448920
This commit is contained in:
David Edmundson 2022-01-24 14:15:35 +00:00 committed by Nate Graham
parent db1f7414b7
commit fdea6d151e

View file

@ -168,6 +168,7 @@ void Dnd::endDrag()
connect(m_currentDrag, &Drag::finish, this, &Dnd::clearOldDrag);
m_oldDrags << m_currentDrag;
}
setWlSource(nullptr);
m_currentDrag = nullptr;
}