X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb2713bfa8fc9b8864eb2c0cebde8df2a7654444..fae5c452834a398c06a318e5da65cff7791eff2b:/src/msw/app.cpp diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 36dedf8627..ed4d736788 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -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. @@ -1289,11 +1297,11 @@ bool wxYield() // normally result in message boxes popping up &c wxLog::Suspend(); -#ifdef __WXDEBUG__ +#ifdef __WXDEBUG__ if (gs_inYield) wxFAIL_MSG( wxT("wxYield called recursively" ) ); #endif - + gs_inYield = TRUE; // we don't want to process WM_QUIT from here - it should be processed in @@ -1327,7 +1335,7 @@ bool wxYieldIfNeeded() { if (gs_inYield) return FALSE; - + return wxYield(); } @@ -1340,7 +1348,8 @@ bool wxHandleFatalExceptions(bool doit) return TRUE; #else wxFAIL_MSG(_T("set wxUSE_ON_FATAL_EXCEPTION to 1 to sue this function")); - + + (void)doit; return FALSE; #endif }