src/screensaverengine.cpp
branchRCL_3
changeset 12 0bfd55b8504e
parent 11 4784a3bc2236
child 14 d8eca2b0590d
--- a/src/screensaverengine.cpp	Wed Apr 14 15:58:13 2010 +0300
+++ b/src/screensaverengine.cpp	Tue Apr 27 16:38:49 2010 +0300
@@ -812,7 +812,17 @@
             // Start the screensaver, but set the ignore flag in case keylock
             // was activated using the side switch. The switch will generate
             // activity that must be ignored.
-            StartScreenSaver();
+            if ( iActivityManagerScreensaverShort->IsMonitoringForActivity() )
+                {
+                // Inactive state, start immediately
+                StartScreenSaver();
+                }
+            else
+                {
+                // Active state, go to inactive and start.
+                iActivityManagerScreensaverShort->SetInactivityTimeout(0);
+                }
+            
             iIgnoreNextActivity = ETrue;
             
             iIgnoreActivityResetTimer = CPeriodic::New( EPriorityLow );