X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69477ac44979d42e1139dc70a2be7c0390043246..7948c0c24401c496c04da3c28f1f1f2f282ba327:/src/generic/dragimgg.cpp diff --git a/src/generic/dragimgg.cpp b/src/generic/dragimgg.cpp index 8c1b4ab485..d625524ed3 100644 --- a/src/generic/dragimgg.cpp +++ b/src/generic/dragimgg.cpp @@ -295,7 +295,13 @@ bool wxGenericDragImage::EndDrag() { if (m_window) { - m_window->ReleaseMouse(); +#ifdef __WXMSW__ + // Under Windows we can be pretty sure this test will give + // the correct results + if (wxWindow::GetCapture() == m_window) +#endif + m_window->ReleaseMouse(); + if (m_cursor.Ok() && m_oldCursor.Ok()) { m_window->SetCursor(m_oldCursor);