taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp
branchRCL_3
changeset 25 137ebc85284b
parent 23 7be2816dbabd
--- a/taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp	Tue May 11 16:02:39 2010 +0300
+++ b/taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp	Tue May 25 12:29:32 2010 +0300
@@ -238,20 +238,19 @@
     TSLOG_CONTEXT( UpdateTaskList, TSLOG_LOCAL );
     TSLOG_IN();
 
+    // screenshot taking support - call Register and Unregister when needed
+    UpdatePreviewContent();
+
+    // get the foreground app uid and publish it to CFW if different than before
+    TRAP_IGNORE( PublishFgAppUidL() );
+
     // There can be many calls in a row, use a timer to prevent degrading
     // device performance.
-    iDataList->SetDirty();
     if ( !iUpdateStarter->IsActive() )
         {
         iUpdateStarter->Start( KContentRefreshDelay, 0,
                 TCallBack( UpdateStarterCallback, this ) );
         }
-
-    // screenshot taking support - call Register and Unregister when needed
-    UpdatePreviewContent();
-
-    // get the foreground app uid and publish it to CFW if different than before
-    TRAP_IGNORE( PublishFgAppUidL() );
     
     TSLOG_OUT();
     }
@@ -316,6 +315,11 @@
         {
         iFgAppUid = newUid;
         iDataList->MoveEntryAtStart(newUid.iUid, EFalse);
+        TBool change( iDataList->MoveEntryAtStart(newUid.iUid, EFalse) );
+        if( change )
+            {
+            iObserver.FswDataChanged();
+            }
         }
 
     TSLOG_OUT();
@@ -755,10 +759,9 @@
     {
 	TSLOG_CONTEXT( HandleWidgetUpdateL, TSLOG_LOCAL );
     
-	iDataList->MoveEntryAtStart(aWidgetId, ETrue);
+	TBool contentChanged( iDataList->MoveEntryAtStart(aWidgetId, ETrue) );
     
 	CFbsBitmap* bmp = 0;
-    TBool contentChanged(EFalse); 
     if( aBitmapHandle )
     	{
 		TRAPD( err, bmp = CopyBitmapL( aBitmapHandle, EFalse ) );