]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/window.cpp
setting the current event record correctly (needed for control text handling)
[wxWidgets.git] / src / mac / carbon / window.cpp
index 8e269242e89932df36c58145b6bf1062858fd84e..bc83a282a225fd13a57852e4868ffaa9e3e9122b 100644 (file)
@@ -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 )
     {