X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef08713a5b339ac1770e14ca7271fcfa02607ce0..fd76aa8d8ae3d8b702b7155ce15c1a927257f1fc:/src/mac/carbon/window.cpp diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 8e269242e8..bc83a282a2 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/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 ) {