Detect when the window is still captured when dragging was aborted for some reason

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2013-01-08 10:25:01 +00:00
parent 52682336e8
commit f5613c9b12

View File

@ -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)