Ensure that the mouse is not captured in the calltip window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -80,6 +80,10 @@ public:
|
|||||||
m_ct = ct;
|
m_ct = ct;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~wxSTCCallTip() {
|
||||||
|
if (HasCapture()) ReleaseMouse();
|
||||||
|
}
|
||||||
|
|
||||||
void OnPaint(wxPaintEvent& evt) {
|
void OnPaint(wxPaintEvent& evt) {
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
Surface* surfaceWindow = Surface::Allocate();
|
Surface* surfaceWindow = Surface::Allocate();
|
||||||
@@ -106,12 +110,10 @@ public:
|
|||||||
|
|
||||||
virtual bool Show( bool show = TRUE ) {
|
virtual bool Show( bool show = TRUE ) {
|
||||||
bool retval = wxSTCCallTipBase::Show(show);
|
bool retval = wxSTCCallTipBase::Show(show);
|
||||||
if (show) {
|
if (show)
|
||||||
CaptureMouse();
|
CaptureMouse();
|
||||||
}
|
else
|
||||||
else {
|
|
||||||
if (HasCapture()) ReleaseMouse();
|
if (HasCapture()) ReleaseMouse();
|
||||||
}
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -80,6 +80,10 @@ public:
|
|||||||
m_ct = ct;
|
m_ct = ct;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~wxSTCCallTip() {
|
||||||
|
if (HasCapture()) ReleaseMouse();
|
||||||
|
}
|
||||||
|
|
||||||
void OnPaint(wxPaintEvent& evt) {
|
void OnPaint(wxPaintEvent& evt) {
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
Surface* surfaceWindow = Surface::Allocate();
|
Surface* surfaceWindow = Surface::Allocate();
|
||||||
@@ -106,12 +110,10 @@ public:
|
|||||||
|
|
||||||
virtual bool Show( bool show = TRUE ) {
|
virtual bool Show( bool show = TRUE ) {
|
||||||
bool retval = wxSTCCallTipBase::Show(show);
|
bool retval = wxSTCCallTipBase::Show(show);
|
||||||
if (show) {
|
if (show)
|
||||||
CaptureMouse();
|
CaptureMouse();
|
||||||
}
|
else
|
||||||
else {
|
|
||||||
if (HasCapture()) ReleaseMouse();
|
if (HasCapture()) ReleaseMouse();
|
||||||
}
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user