]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
yet another attempt to fix LastFocus bug in wxFrame
[wxWidgets.git] / src / msw / app.cpp
index 3424745eafa1e9eefb0daeeac4afd21b526ccfce..ed4d7367887739ba8cb9c71fb08307ef66151cdd 100644 (file)
@@ -601,7 +601,9 @@ void wxApp::CleanUp()
 #if wxUSE_THREADS
     delete wxPendingEventsLocker;
     // If we don't do the following, we get an apparent memory leak.
+#if wxUSE_VALIDATORS
     ((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
+#endif
 #endif
 
     wxClassInfo::CleanUpClasses();
@@ -1058,6 +1060,12 @@ bool wxApp::ProcessMessage(WXMSG *wxmsg)
     {
         if ( wnd->MSWTranslateMessage(wxmsg) )
             return TRUE;
+
+        // stop at first top level window, i.e. don't try to process the key
+        // strokes originating in a dialog using the accelerators of the parent
+        // frame - this doesn't make much sense
+        if ( wnd->IsTopLevel() )
+            break;
     }
 
     // Anyone for a non-translation message? Try youngest descendants first.