diff -r d05a55b217df -r 79311d856354 taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp --- a/taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp Wed Apr 14 15:47:59 2010 +0300 +++ b/taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp Tue Apr 27 16:26:12 2010 +0300 @@ -172,7 +172,7 @@ // convert aWgId to an index in the list of running widgets and close widget CloseWidgetL( -aWgId -1 ); } - else if( !iDataList->AlwaysShownApps()->IsAlwaysShownApp( AppUidForWgIdL( aWgId ) ) ) + else if( !iDataList->IsAlwaysShownAppL( aWgId ) ) { // send window group event to kill the app TWsEvent event; @@ -243,12 +243,12 @@ // 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 ) ); } - iDataList->SetDirty(); // screenshot taking support - call Register and Unregister when needed UpdatePreviewContent(); @@ -366,20 +366,6 @@ } // -------------------------------------------------------------------------- -// CTsFswEngine::AppUidForWgIdL -// -------------------------------------------------------------------------- -// -TUid CTsFswEngine::AppUidForWgIdL( TInt aWgId ) - { - CApaWindowGroupName* windowName = - CApaWindowGroupName::NewLC( iWsSession, aWgId ); - TUid appUid = windowName->AppUid(); - CleanupStack::PopAndDestroy( windowName ); - return appUid; - - } - -// -------------------------------------------------------------------------- // CTsFswEngine::CopyBitmapL // -------------------------------------------------------------------------- // @@ -496,7 +482,7 @@ TSLOG2_IN( "aWgId = %d aFbsHandle = %d", aWgId, aFbsHandle ); TUid appUid; - TRAPD( err, appUid = AppUidForWgIdL( aWgId ) ); + TInt err = iDataList->AppUidForWgId( aWgId, appUid ); if ( err || appUid == KTsCameraUid ) { // Dont't assign screenshot to camera app @@ -511,8 +497,8 @@ iPreviewProvider->AckPreview(aFbsHandle); if ( err == KErrNone ) { + iDataList->MoveEntryAtStart(appUid.iUid, EFalse); StoreScreenshot(aWgId, bmp); - iDataList->MoveEntryAtStart(appUid.iUid, EFalse); } TSLOG_OUT(); @@ -767,7 +753,10 @@ void CTsFswEngine::HandleWidgetUpdateL(TInt aWidgetId, TInt aBitmapHandle) { TSLOG_CONTEXT( HandleWidgetUpdateL, TSLOG_LOCAL ); - CFbsBitmap* bmp = 0; + + iDataList->MoveEntryAtStart(aWidgetId, ETrue); + + CFbsBitmap* bmp = 0; TBool contentChanged(EFalse); if( aBitmapHandle ) { @@ -782,7 +771,6 @@ iObserver.FswDataChanged(); } - iDataList->MoveEntryAtStart(aWidgetId, ETrue); TSLOG_OUT(); }