From 4834f8e492a63f2c21bf4b71591523713edd5385 Mon Sep 17 00:00:00 2001 From: Monte Goulding Date: Sat, 20 Oct 2018 11:39:55 +1100 Subject: [PATCH] [[ Bug 21474 ]] Reset mouse stack after drag and drop This patch resolves an issue where after a drag and drop operation the mouse stack was being cleared in `wmdragdrop`. This resulted in a seemingly unresponsive stack as mouse events are guarded by `MCmousestackptr`. As `wmdragdrop` is only called when a window recieves a drag drop event we can ensure the mouse stack is correct by finding the stack for the window and setting it to that. --- docs/notes/bugfix-21474.md | 1 + engine/src/dispatch.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 docs/notes/bugfix-21474.md diff --git a/docs/notes/bugfix-21474.md b/docs/notes/bugfix-21474.md new file mode 100644 index 00000000000..5ac6b5e8de3 --- /dev/null +++ b/docs/notes/bugfix-21474.md @@ -0,0 +1 @@ +# Fix unresponsive stack after drag and drop \ No newline at end of file diff --git a/engine/src/dispatch.cpp b/engine/src/dispatch.cpp index 6de406120d8..ec155eecba9 100644 --- a/engine/src/dispatch.cpp +++ b/engine/src/dispatch.cpp @@ -1705,7 +1705,7 @@ MCDragAction MCDispatch::wmdragdrop(Window w) dodrop(false); // The drag operation has ended. Remove the drag board contents. - MCmousestackptr = nil; + MCmousestackptr = findstackd(w); MCdragboard->Clear(); m_drag_target = false;