X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/52682336e8b619044682102d16f22a058f5b2a59..f5613c9b12d97846e2f63bf7569082cbbf5ae845:/src/richtext/richtextctrl.cpp diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index d4408a8b8a..06dbf17af1 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -751,6 +751,14 @@ void wxRichTextCtrl::OnLeftUp(wxMouseEvent& event) /// Mouse-movements void wxRichTextCtrl::OnMoveMouse(wxMouseEvent& event) { + if (!event.Dragging() && m_dragging) + { + // We may have accidentally lost a mouse-up event, especially on Linux + m_dragging = false; + if (GetCapture() == this) + ReleaseMouse(); + } + #if wxUSE_DRAG_AND_DROP size_t distance = 0; if (m_preDrag || m_dragging)