MGR: Possible fix for excess CPU usage when Manager window is closed / hidden

- I think this is safe, but it needs testing to ensure it has no adverse side effects
This commit is contained in:
Charlie Fenton 2014-02-14 02:50:46 -08:00
parent 144b5052ea
commit 3c7dc5d3c1
1 changed files with 8 additions and 0 deletions

View File

@ -997,6 +997,14 @@ void CMainDocument::RunPeriodicRPCs(int frameRefreshRate) {
request.arg1 = &m_iNoticeSequenceNumber;
request.arg2 = &notices;
request.rpcType = RPC_TYPE_ASYNC_WITH_REFRESH_AFTER;
if (!pFrame->IsShown()
#ifdef __WXMAC__
|| (!wxGetApp().IsApplicationVisible())
#endif
) {
request.rpcType = RPC_TYPE_ASYNC_NO_REFRESH;
}
request.completionTime = &m_dtNoticesTimeStamp;
request.resultPtr = &m_iGet_notices_rpc_result;