]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/nonownedwnd_osx.cpp
Fix another line somehow missing from the wxGraphicsBitmap forward port.
[wxWidgets.git] / src / osx / nonownedwnd_osx.cpp
index 12d8d61aab9248148870d92e23550a44214521a6..017107215f22521e3e247c280e9dc01380018a69 100644 (file)
@@ -147,9 +147,6 @@ bool wxNonOwnedWindow::Create(wxWindow *parent,
     if ( parent )
         parent->AddChild(this);
 
     if ( parent )
         parent->AddChild(this);
 
-    wxBIND_OR_CONNECT_HACK(this, wxEVT_DESTROY, wxWindowDestroyEventHandler,
-                           wxNonOwnedWindow::OnWindowDestroy, this);
-
     return true;
 }
 
     return true;
 }
 
@@ -169,10 +166,15 @@ wxNonOwnedWindow::~wxNonOwnedWindow()
         s_macDeactivateWindow = NULL;
 }
 
         s_macDeactivateWindow = NULL;
 }
 
-void wxNonOwnedWindow::OnWindowDestroy( wxWindowDestroyEvent &event)
+bool wxNonOwnedWindow::Destroy()
 {
 {
-    event.Skip();
+    WillBeDestroyed();
     
     
+    return wxWindow::Destroy();
+}
+
+void wxNonOwnedWindow::WillBeDestroyed()
+{
     if ( m_nowpeer )
         m_nowpeer->WillBeDestroyed();
 }
     if ( m_nowpeer )
         m_nowpeer->WillBeDestroyed();
 }