diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index 10859100d6..1bf2c8800a 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -80,6 +80,10 @@ public: m_ct = ct; } + ~wxSTCCallTip() { + if (HasCapture()) ReleaseMouse(); + } + void OnPaint(wxPaintEvent& evt) { wxPaintDC dc(this); Surface* surfaceWindow = Surface::Allocate(); @@ -106,12 +110,10 @@ public: virtual bool Show( bool show = TRUE ) { bool retval = wxSTCCallTipBase::Show(show); - if (show) { + if (show) CaptureMouse(); - } - else { + else if (HasCapture()) ReleaseMouse(); - } return retval; } diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 10859100d6..1bf2c8800a 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -80,6 +80,10 @@ public: m_ct = ct; } + ~wxSTCCallTip() { + if (HasCapture()) ReleaseMouse(); + } + void OnPaint(wxPaintEvent& evt) { wxPaintDC dc(this); Surface* surfaceWindow = Surface::Allocate(); @@ -106,12 +110,10 @@ public: virtual bool Show( bool show = TRUE ) { bool retval = wxSTCCallTipBase::Show(show); - if (show) { + if (show) CaptureMouse(); - } - else { + else if (HasCapture()) ReleaseMouse(); - } return retval; }