X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/467e3168b33200bf6d62317294799363ed7dd50e..62d3ee70e51f335188a788372a3e66acbcd0bb63:/src/mac/window.cpp diff --git a/src/mac/window.cpp b/src/mac/window.cpp index 8e269242e8..bc83a282a2 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -169,6 +169,13 @@ wxWindowMac::~wxWindowMac() { s_lastMouseWindow = NULL ; } + + wxFrame* frame = wxDynamicCast( wxGetTopLevelParent( this ) , wxFrame ) ; + if ( frame ) + { + if ( frame->GetLastFocus() == this ) + frame->SetLastFocus( NULL ) ; + } if ( gFocusWindow == this ) {