From fdea6d151ec31d80047eaf9bc1649394e5e9602a Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 24 Jan 2022 14:15:35 +0000 Subject: [PATCH] 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 --- src/xwl/dnd.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xwl/dnd.cpp b/src/xwl/dnd.cpp index 75672d7316..e97302f505 100644 --- a/src/xwl/dnd.cpp +++ b/src/xwl/dnd.cpp @@ -168,6 +168,7 @@ void Dnd::endDrag() connect(m_currentDrag, &Drag::finish, this, &Dnd::clearOldDrag); m_oldDrags << m_currentDrag; } + setWlSource(nullptr); m_currentDrag = nullptr; }