X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5438a5665e35ee6286c5af73747873df9daed252..491b5be8305968871bc289453ed088a70c3de044:/src/msw/app.cpp diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 7cfe66ae9e..f542a094a8 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -1112,6 +1112,14 @@ void wxApp::OnIdle(wxIdleEvent& event) wxLog::FlushActive(); #endif // wxUSE_LOG +#if wxUSE_DC_CACHEING + // automated DC cache management: clear the cached DCs and bitmap + // if it's likely that the app has finished with them, that is, we + // get an idle event and we're not dragging anything. + if (!::GetKeyState(MK_LBUTTON) && !::GetKeyState(MK_MBUTTON) && !::GetKeyState(MK_RBUTTON)) + wxDC::ClearCache(); +#endif // wxUSE_DC_CACHEING + // Send OnIdle events to all windows if ( SendIdleEvents() ) {