taskswitcher/screenshotplugin/src/tsscreenshotplugin.cpp
changeset 125 26079c1bb561
parent 119 50e220be30d1
child 127 7b66bc3c6dc9
--- a/taskswitcher/screenshotplugin/src/tsscreenshotplugin.cpp	Mon Sep 27 11:31:59 2010 +0300
+++ b/taskswitcher/screenshotplugin/src/tsscreenshotplugin.cpp	Wed Oct 06 16:00:22 2010 +0300
@@ -58,7 +58,7 @@
                              TWservCrEvent::EWindowGroupChanged |
                              TWservCrEvent::EDeviceOrientationChanged);
     iWindowGroupId = KInvalidGroupId;
-    iBlockedList = CTsIdList::NewL(); 
+    iAllowedList = CTsIdList::NewL(); 
     }
 
 
@@ -68,7 +68,7 @@
  */
 CTsScreenshotPlugin::~CTsScreenshotPlugin()
     {
-    delete iBlockedList;
+    delete iAllowedList;
     Env().UnregisterEventHandler(this);
     iCache.ResetAndDestroy();
     }
@@ -118,11 +118,11 @@
             }
         CleanupStack::PopAndDestroy( screenshotMsg );
         }
-    else if( IgnoreWindowGroups == function )
+    else if( AllowedWindowGroups == function )
         {
         CTsIdList* list = CTsIdList::NewLC( msgStream );
-        delete iBlockedList;
-        iBlockedList = list;
+        delete iAllowedList;
+        iAllowedList = list;
         CleanupStack::Pop( list );
         }
     CleanupStack::PopAndDestroy( &msgStream );
@@ -140,12 +140,15 @@
         if( KInvalidGroupId != iWindowGroupId )
             {
             NotifyWindowGroupToBackground( iWindowGroupId );
-            TakeScreenshot( iWindowGroupId );
+            if(iAllowedList->IsPresent(iWindowGroupId))
+                {
+                TakeScreenshot( iWindowGroupId );
+                }
             }
         iWindowGroupId = aEvent.WindowGroupIdentifier();
         break;
     case TWservCrEvent::EDeviceOrientationChanged:
-        if( !iBlockedList->IsPresent( iWindowGroupId ) )
+        if( iAllowedList->IsPresent( iWindowGroupId ) )
             {
             TakeScreenshot( iWindowGroupId );
             }