]> git.saurik.com Git - wxWidgets.git/commitdiff
fix aui crash related to SF bug 1531361
authorBenjamin Williams <bwilliams@kirix.com>
Tue, 31 Oct 2006 07:41:32 +0000 (07:41 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Tue, 31 Oct 2006 07:41:32 +0000 (07:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/framemanager.cpp

index 358f149d315283ea43e098eafd00a57343494a7a..3ae027d0545f2b1a3d78f9df3469070175a24dfb 100644 (file)
@@ -2067,6 +2067,22 @@ void wxFrameManager::Update()
             // reduce flicker
             p.window->SetSize(1,1);
 
+
+           // the following block is a workaround for bug #1531361
+           // (see wxWidgets sourceforge page).  On wxGTK (only), when
+           // a frame is shown/hidden, a move event unfortunately
+           // also gets fired.  Because we may be dragging around
+           // a pane, we need to cancel that action here to prevent
+           // a spurious crash.
+           if (m_action_window == p.frame)
+           {
+               if (wxWindow::GetCapture() == m_frame)
+                    m_frame->ReleaseMouse();
+                m_action = actionNone;
+               m_action_window = NULL;
+           }
+
+           // hide the frame
             if (p.frame->IsShown())
                 p.frame->Show(false);