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:
@@ -751,6 +751,14 @@ void wxRichTextCtrl::OnLeftUp(wxMouseEvent& event)
|
|||||||
/// Mouse-movements
|
/// Mouse-movements
|
||||||
void wxRichTextCtrl::OnMoveMouse(wxMouseEvent& event)
|
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
|
#if wxUSE_DRAG_AND_DROP
|
||||||
size_t distance = 0;
|
size_t distance = 0;
|
||||||
if (m_preDrag || m_dragging)
|
if (m_preDrag || m_dragging)
|
||||||
|
Reference in New Issue
Block a user