vtuis/lcvtplugin/src/base/clcvtsession.cpp
changeset 44 b6ab36974f47
parent 43 fc383c0181e8
child 45 1d2da8828aa6
--- a/vtuis/lcvtplugin/src/base/clcvtsession.cpp	Mon Aug 23 15:49:33 2010 +0300
+++ b/vtuis/lcvtplugin/src/base/clcvtsession.cpp	Fri Sep 03 13:48:38 2010 +0300
@@ -285,6 +285,9 @@
     delete repository;
     
     iIndicatorCtr = new  ( ELeave ) LcVtIndicatorController();
+    
+    iForeGroundStatus = EFalse;
+    
     __VTPRINTEXIT( "CLcVtSession.ConstructL" )
     
     }
@@ -954,10 +957,12 @@
 {
     __VTPRINTENTER( "CLcVtSession.SetForegroundStatus" )
     __VTPRINT2( DEBUG_MEDIA , "    foreground: %d", aIsForeground )
+    
+    iForeGroundStatus = aIsForeground;
 
     if ( iRwGroup )
         {
-        TInt priority = aIsForeground ? ECoeWinPriorityNormal : ECoeWinPriorityNeverAtFront;
+        TInt priority = iForeGroundStatus ? ECoeWinPriorityNormal : ECoeWinPriorityNeverAtFront;
         iRwGroup->SetOrdinalPosition( 1 , priority );
         iRemoteVideoWindow->SetOrdinalPosition( 1 , priority );
         iLocalVideoWindow->SetOrdinalPosition( 1 , priority );
@@ -1235,7 +1240,6 @@
             break;
         case EVtSessionAnsweredDoPrepareCamera:
             {
-            MVtEngMedia& media = iModel->Media();
             MVtEngMedia::TMediaSource source = MVtEngMedia::EMediaCamera;
             ActiveExecInitPrepareCameraL( source, aRequest );
             aNextState = EVtSessionAnsweredSetlectCamera;
@@ -1888,12 +1892,14 @@
 void CLcVtSession::UpdateRenderingParametersL()
     {
     __VTPRINTENTER( "CLcVtSession.UpdateRenderingParametersL" )
+            
+    TInt priority = iForeGroundStatus ? ECoeWinPriorityNormal : ECoeWinPriorityNeverAtFront;
     
-    iRwGroup->SetOrdinalPosition( 1 , ECoeWinPriorityNormal );
+    iRwGroup->SetOrdinalPosition( 1 , priority );
     
     TRect RMRect = RemoteVideoPlayer()->LcWindow()->LcWindowRect();
     iRemoteVideoWindow->SetExtent( RMRect.iTl, RMRect.Size() ); 
-    iRemoteVideoWindow->SetOrdinalPosition( 1 , ECoeWinPriorityNeverAtFront );
+    iRemoteVideoWindow->SetOrdinalPosition( 1 , priority );
     iRemoteVideoWindow->SetTransparencyAlphaChannel();
     
     __VTPRINT2( DEBUG_MEDIA , "    RemoteVideoPlayer.RMRect.iTl.iX: %d", RMRect.iTl.iX )
@@ -1904,7 +1910,7 @@
     
     TRect VFRect = LocalVideoPlayer()->LcWindow()->LcWindowRect();
     iLocalVideoWindow->SetExtent( VFRect.iTl, VFRect.Size() );
-    iLocalVideoWindow->SetOrdinalPosition( 1, ECoeWinPriorityNeverAtFront );
+    iLocalVideoWindow->SetOrdinalPosition( 1, priority );
     iLocalVideoWindow->SetTransparencyAlphaChannel();
     
     __VTPRINT2( DEBUG_MEDIA , "    LocalVideoPlayer.VFRect.iTl.iX: %d", VFRect.iTl.iX )