]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/framemanager.cpp
catch unhandled exceptions in POSIX threads implementation the same way wxMSW does
[wxWidgets.git] / src / aui / framemanager.cpp
index 6e38dd291de94f5530b3c75349c34b3d738d0b84..9e91f09a2a1abe8c966fcd7a4b69058dee981648 100644 (file)
@@ -67,6 +67,11 @@ DEFINE_EVENT_TYPE(wxEVT_AUI_FIND_MANAGER)
     #include "wx/mac/private.h"
 #endif
 
+#ifdef __WXMSW__
+    #include "wx/msw/wrapwin.h"
+    #include "wx/msw/private.h"
+#endif
+
 IMPLEMENT_DYNAMIC_CLASS(wxAuiManagerEvent, wxEvent)
 IMPLEMENT_CLASS(wxAuiManager, wxEvtHandler)
 
@@ -214,7 +219,7 @@ END_EVENT_TABLE()
 #else
   // __WXGTK20__
 
-#include "wx/gtk/private.h"
+#include <gtk/gtk.h>
 
 static void
 gtk_pseudo_window_realized_callback( GtkWidget *m_widget, void *WXUNUSED(win) )
@@ -248,12 +253,12 @@ public:
             return;
 
         m_title = title;
-        
+
         m_widget = gtk_window_new( GTK_WINDOW_POPUP );
 
         g_signal_connect( m_widget, "realize",
                       G_CALLBACK (gtk_pseudo_window_realized_callback), this );
-        
+
         GdkColor col;
         col.red = 128 * 256;
         col.green = 192 * 256;
@@ -265,7 +270,7 @@ public:
     {
         return true;
     }
-    
+
 private:
     DECLARE_DYNAMIC_CLASS(wxPseudoTransparentFrame)
 };
@@ -291,10 +296,14 @@ static void DrawResizeHint(wxDC& dc, const wxRect& rect)
     wxBitmap stipple = wxPaneCreateStippleBitmap();
     wxBrush brush(stipple);
     dc.SetBrush(brush);
+#ifdef __WXMSW__
+    PatBlt(GetHdcOf(dc), rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight(), PATINVERT);
+#else
     dc.SetPen(*wxTRANSPARENT_PEN);
 
     dc.SetLogicalFunction(wxXOR);
     dc.DrawRectangle(rect);
+#endif
 }
 
 
@@ -511,7 +520,7 @@ static void RenumberDockRows(wxAuiDockInfoPtrArray& docks)
     {
         wxAuiDockInfo& dock = *docks.Item(i);
         dock.dock_row = i;
-        
+
         int j, pane_count;
         for (j = 0, pane_count = dock.panes.GetCount(); j < pane_count; ++j)
             dock.panes.Item(j)->dock_row = i;
@@ -586,12 +595,18 @@ wxAuiManager::wxAuiManager(wxWindow* managed_wnd, unsigned int flags)
 
 wxAuiManager::~wxAuiManager()
 {
+    // NOTE: It's possible that the windows have already been destroyed by the
+    // time this dtor is called, so this loop can result in memory access via
+    // invalid pointers, resulting in a crash.  So it will be disabled while
+    // waiting for a better solution.
+#if 0
     for ( size_t i = 0; i < m_panes.size(); i++ )
     {
         wxAuiPaneInfo& pinfo = m_panes[i];
         if (pinfo.window && !pinfo.window->GetParent())
             delete pinfo.window;
     }
+#endif
 
     delete m_art;
 }
@@ -4429,7 +4444,7 @@ void wxAuiManager::OnPaneButton(wxAuiManagerEvent& evt)
             {
                 ClosePane(pane);
             }
-            
+
             Update();
         }
     }