From 6c7dfedcbf72a3679fc3a73b6ecb89b64a71fbc8 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Mon, 23 May 2005 03:11:04 +0000 Subject: [PATCH] Repaint ScEd at 2 fps when non-minimised but behind other windows This was SVN commit r2339. --- source/tools/sced/ui/ScEd.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/source/tools/sced/ui/ScEd.cpp b/source/tools/sced/ui/ScEd.cpp index 45520ce4c8..98fec000a7 100755 --- a/source/tools/sced/ui/ScEd.cpp +++ b/source/tools/sced/ui/ScEd.cpp @@ -187,13 +187,18 @@ int CScEdApp::Run() // do idle time processing CMainFrame* mainfrm=(CMainFrame*) AfxGetMainWnd(); if (mainfrm) { - if (!mainfrm->IsIconic()) { - CScEdView* view=(CScEdView*) mainfrm->GetActiveView(); - if (view) { - view->IdleTimeProcess(); - } - } - Sleep(50); + + // longer delay when visible but not active + if (!mainfrm->IsTopParentActive()) + Sleep(450); + + if (!mainfrm->IsIconic()) { + CScEdView* view=(CScEdView*) mainfrm->GetActiveView(); + if (view) { + view->IdleTimeProcess(); + } + } + Sleep(50); } }