]> git.saurik.com Git - wxWidgets.git/commitdiff
cancel the current operation if mouse capture is lost (#9979)
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 19 Sep 2008 07:38:24 +0000 (07:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 19 Sep 2008 07:38:24 +0000 (07:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/aui/framemanager.h
src/aui/framemanager.cpp

index 8b80a6d0bcb3d839a471cac9e4b7b17517bbe5eb..966b26f7cfe076cabd1d303e2244393c1e7f36f1 100644 (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);
index fb46813dba2591c1b98e4d3533dcf7c1b1ae91b4..c2861cf84c561b6641e7b8630264fab7bb724fd1 100644 (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