cancel the current operation if mouse capture is lost (#9979)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-09-19 07:38:24 +00:00
parent 4f47a8d0c6
commit e2074948cb
2 changed files with 12 additions and 0 deletions

View File

@ -575,6 +575,7 @@ protected:
void OnLeftDown(wxMouseEvent& evt);
void OnLeftUp(wxMouseEvent& evt);
void OnMotion(wxMouseEvent& evt);
void OnCaptureLost(wxMouseCaptureLostEvent& evt);
void OnLeaveWindow(wxMouseEvent& evt);
void OnChildFocus(wxChildFocusEvent& evt);
void OnHintFadeTimer(wxTimerEvent& evt);

View File

@ -572,6 +572,7 @@ BEGIN_EVENT_TABLE(wxAuiManager, wxEvtHandler)
EVT_LEFT_UP(wxAuiManager::OnLeftUp)
EVT_MOTION(wxAuiManager::OnMotion)
EVT_LEAVE_WINDOW(wxAuiManager::OnLeaveWindow)
EVT_MOUSE_CAPTURE_LOST(wxAuiManager::OnCaptureLost)
EVT_CHILD_FOCUS(wxAuiManager::OnChildFocus)
EVT_AUI_FIND_MANAGER(wxAuiManager::OnFindManager)
EVT_TIMER(101, wxAuiManager::OnHintFadeTimer)
@ -4441,6 +4442,16 @@ void wxAuiManager::OnLeaveWindow(wxMouseEvent& WXUNUSED(event))
}
}
void wxAuiManager::OnCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event))
{
// cancel the operation in progress, if any
if ( m_action != actionNone )
{
m_action = actionNone;
HideHint();
}
}
void wxAuiManager::OnChildFocus(wxChildFocusEvent& event)
{
// when a child pane has it's focus set, we should change the