emailuis/emailui/src/FreestyleEmailUiAppui.cpp
changeset 2 5253a20d2a1e
parent 1 12c456ceeff2
child 3 a4d6f1ea0416
--- a/emailuis/emailui/src/FreestyleEmailUiAppui.cpp	Thu Jan 07 12:38:38 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiAppui.cpp	Mon Jan 18 20:08:26 2010 +0200
@@ -176,7 +176,7 @@
 // ---------------------------------------------------------------------------
 //
 TInt CFreestyleEmailUiAppUi::LoadResourceFileL(
-    const TDesC& aFileName, 
+    const TDesC& aFileName,
     const TDesC& aFilePath )
     {
     FUNC_LOG;
@@ -196,19 +196,19 @@
             TFileName nearestFile( parse.FullName() );
             BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), nearestFile );
             delete dirList;
-            
+
             INFO_1( "Load resource: %S", &nearestFile );
             // Return the resource file offset if file loaded succesfully
             return iEikonEnv->AddResourceFileL( nearestFile );
             }
         delete dirList;
         }
-	
+
     // Leave if resource file is not found
     User::Leave( err );
     return 0; // To avoid compiler warnings
     }
-    
+
 // ---------------------------------------------------------------------------
 // ConstructL is called by the application framework
 // ---------------------------------------------------------------------------
@@ -221,7 +221,7 @@
     iMsgEditorResourceOffset = LoadResourceFileL(
                                    KMsgEditorAppUiResourceFileName,
                                    KDC_RESOURCE_FILES_DIR );
-    
+
     // Load FSMailServer resource file, search first the same drive from where
     // our process is loaded as FSMailServer should be installed in same drive
     RProcess ownProcess;
@@ -230,7 +230,7 @@
     iFSMailServerResourceOffset = LoadResourceFileL(
                                       KFSMailServerResourceFileNameWithPath,
                                       ownProcessName.LeftTPtr( KDriveDescLength ) );
-    
+
 	// flag indicating whether we are in AppUi::ConstructL
 	// workaround for compose view loadbackgroundcontext sending skin changed events
 	// and causing texture manager to be reconstructed many times
@@ -1120,7 +1120,13 @@
     switch ( aEvent.Type() )
         {
         case KAknFullOrPartialForegroundLost:
+            {
+            if( iCurrentActiveView )
+                {
+                iCurrentActiveView->HandleAppForegroundEventL( EFalse );
+                }
             break;
+            }
         case KAknFullOrPartialForegroundGained:
             {
             if ( iCurrentActiveView && !iSettingsViewActive )
@@ -2069,7 +2075,7 @@
 	    }
 	return ret;
 	}
-	
+
 // Move to previous message when the current message is deleted in viewer
 TInt CFreestyleEmailUiAppUi::MoveToPreviousMsgAfterDeleteL( TFSMailMsgId aFoundPreviousMsgId )
 	{
@@ -2079,9 +2085,9 @@
 		{
 		iNavigationHistory->Head()->MoveToPreviousMsgAfterDeleteL( aFoundPreviousMsgId );
 		}
-	return ret;		
+	return ret;
 	}
-	
+
 CDocumentHandler& CFreestyleEmailUiAppUi::DocumentHandler()
 	{
     FUNC_LOG;
@@ -2614,7 +2620,7 @@
 	TBool oldFocusState( iFocusVisible );
 	iFocusVisible = aVisible;
 	CFsEmailUiViewBase* activeView = CurrentActiveView();
-	if ( /*oldFocusState != aVisible &&*/ activeView )
+	if ( activeView )
 		{
 		activeView->FocusVisibilityChange( aVisible );
 		}