uifw/AvKon/src/aknsgcc.cpp
branchRCL_3
changeset 18 fcdfafb36fe7
parent 0 2f259fa3e83a
child 19 aecbbf00d063
--- a/uifw/AvKon/src/aknsgcc.cpp	Thu Jul 15 18:56:19 2010 +0300
+++ b/uifw/AvKon/src/aknsgcc.cpp	Thu Aug 19 10:11:06 2010 +0300
@@ -46,7 +46,8 @@
 	EHandlingChange,
 	EInAknSrv,
 	ESystemFaded,
-	ENeverRelinquish
+	ENeverRelinquish,
+	EUseForegroundPriority
 	};
 
 
@@ -618,11 +619,11 @@
 	RThread myThread;
 	TProcessPriority priority = myThread.ProcessPriority();
 
-	if( IsSystemFaded() )
+	if ( IsSystemFaded() || iFlags[EUseForegroundPriority] )
 		{
-		// Solution for EKKG-7RQ9U8:
 		// If the system is faded we have a popup on screen.
-		// Get the process behind the foreground process. 
+		// Get the process behind the foreground process, the
+	    // EUseForegroundPriority should also affect only that process. 
 		TApaTask task = TApaTaskList(iEikonEnv->WsSession()).FindByPos(1);
 
 		// Check if this application is next behind the foreground app.
@@ -657,6 +658,23 @@
 	    }
 	}
 
+void CAknSgcClient::UseForegroundPriorityDuringRelinquish(
+    TBool aUseForeground )
+    {
+    CAknSgcClient* self = Static();
+    if ( self )
+        {
+        if ( aUseForeground )
+            {
+            self->iFlags.Set( EUseForegroundPriority );
+            }
+        else
+            {
+            self->iFlags.Clear( EUseForegroundPriority );
+            }
+        }
+    }
+
 EXPORT_C CAknLayoutConfig& CAknSgcClient::LayoutConfig()
 	{
 	CAknSgcClient* self = Static();