X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0aaa6ace7ede4240453251d6a1c84c918c54c321..125e7c11c16f23daa4c594f3b8d90194099c2394:/src/osx/nonownedwnd_osx.cpp diff --git a/src/osx/nonownedwnd_osx.cpp b/src/osx/nonownedwnd_osx.cpp index 12d8d61aab..017107215f 100644 --- a/src/osx/nonownedwnd_osx.cpp +++ b/src/osx/nonownedwnd_osx.cpp @@ -147,9 +147,6 @@ bool wxNonOwnedWindow::Create(wxWindow *parent, if ( parent ) parent->AddChild(this); - wxBIND_OR_CONNECT_HACK(this, wxEVT_DESTROY, wxWindowDestroyEventHandler, - wxNonOwnedWindow::OnWindowDestroy, this); - return true; } @@ -169,10 +166,15 @@ wxNonOwnedWindow::~wxNonOwnedWindow() 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(); }