taskswitcher/taskswitcherui/taskswitcherapp/src/tsappview.cpp
branchRCL_3
changeset 25 137ebc85284b
parent 23 7be2816dbabd
child 26 1b758917cafc
equal deleted inserted replaced
23:7be2816dbabd 25:137ebc85284b
   444     TSLOG_CONTEXT( CTsAppView::HandleSwitchToForegroundEvent, TSLOG_LOCAL );
   444     TSLOG_CONTEXT( CTsAppView::HandleSwitchToForegroundEvent, TSLOG_LOCAL );
   445     TSLOG_IN();
   445     TSLOG_IN();
   446     
   446     
   447     // Forward event to interested controls
   447     // Forward event to interested controls
   448     iFastSwapArea->HandleSwitchToForegroundEvent();
   448     iFastSwapArea->HandleSwitchToForegroundEvent();
   449     iFastSwapArea->UpdateComponentVisibility();
       
   450     
   449     
   451     // Check for layout updates
   450     // Check for layout updates
   452     CTsAppUi* appUi = static_cast<CTsAppUi*>(iCoeEnv->AppUi());
   451     CTsAppUi* appUi = static_cast<CTsAppUi*>(iCoeEnv->AppUi());
   453     if ( iViewRect != appUi->ApplicationRect() &&
   452     if ( iViewRect != appUi->ApplicationRect() &&
   454          appUi->LayoutChangeAllowed() )
   453          appUi->LayoutChangeAllowed() )
   481         CAknTransitionUtils::MakeVisibleSubComponents( this,
   480         CAknTransitionUtils::MakeVisibleSubComponents( this,
   482             CAknTransitionUtils::EForceVisible );
   481             CAknTransitionUtils::EForceVisible );
   483         MakeVisible( ETrue );
   482         MakeVisible( ETrue );
   484         }
   483         }
   485     
   484     
   486     iFastSwapArea->UpdateComponentVisibility();
       
   487     DrawDeferred();
   485     DrawDeferred();
   488     
   486     
   489     TSLOG_OUT();
   487     TSLOG_OUT();
   490     }
   488     }
   491 
   489 
   599     {
   597     {
   600     if( TPointerEvent::EButton1Down == aPointerEvent.iType )
   598     if( TPointerEvent::EButton1Down == aPointerEvent.iType )
   601         {
   599         {
   602         iEvtHandler->EnableEventHandling(ETrue);
   600         iEvtHandler->EnableEventHandling(ETrue);
   603         iExitOnPointerUp = EFalse;
   601         iExitOnPointerUp = EFalse;
   604 		LaunchFeedback(ETouchFeedbackBasic, TTouchFeedbackType(
       
   605 				ETouchFeedbackVibra | ETouchFeedbackAudio), aPointerEvent);
       
   606 
   602 
   607 		if( !DragArea().Contains(aPointerEvent.iParentPosition) ||
   603 		if( !DragArea().Contains(aPointerEvent.iParentPosition) ||
   608 		    !iFastSwapArea->Count() )
   604 		    !iFastSwapArea->Count() )
   609 		    {
   605 		    {
   610 		    //move task switcher to background
   606 		    //move task switcher to background
   613 		         !iFastSwapArea->Count() )
   609 		         !iFastSwapArea->Count() )
   614 		        {
   610 		        {
   615 		        iExitOnPointerUp = ETrue;
   611 		        iExitOnPointerUp = ETrue;
   616 		        }
   612 		        }
   617 		    }
   613 		    }
       
   614 		else if ( !iAppsHeading->Rect().Contains( aPointerEvent.iParentPosition ) ||
       
   615                   !iFastSwapArea->Count() )
       
   616 		    {
       
   617 		    // Feedback only on "active" areas of UI
       
   618 		    LaunchFeedback(ETouchFeedbackBasic, TTouchFeedbackType(
       
   619 		            ETouchFeedbackVibra | ETouchFeedbackAudio), aPointerEvent);
       
   620 		    }
   618         }
   621         }
   619     else if( TPointerEvent::EButton1Up == aPointerEvent.iType && iExitOnPointerUp )
   622     else if( TPointerEvent::EButton1Up == aPointerEvent.iType && iExitOnPointerUp )
   620         {
   623         {
   621         // Possible exit, check if pointer up is outside of control area
   624         // Possible exit, check if pointer up is outside of control area
   622         if( ( !DragArea().Contains(aPointerEvent.iParentPosition) &&
   625         if( ( !DragArea().Contains(aPointerEvent.iParentPosition) &&
   623               !iAppsHeading->Rect().Contains(aPointerEvent.iParentPosition) ) ||
   626               !iAppsHeading->Rect().Contains(aPointerEvent.iParentPosition) ) ||
   624             !iFastSwapArea->Count() )
   627             !iFastSwapArea->Count() )
   625             {
   628             {
       
   629             LaunchFeedback(ETouchFeedbackBasic, TTouchFeedbackType(
       
   630                     ETouchFeedbackVibra | ETouchFeedbackAudio), aPointerEvent);
   626             iEikonEnv->EikAppUi()->HandleCommandL(EAknSoftkeyExit);
   631             iEikonEnv->EikAppUi()->HandleCommandL(EAknSoftkeyExit);
   627             }
   632             }
   628         }
   633         }
   629     iFastSwapArea->HandlePointerEventL(aPointerEvent);
   634     iFastSwapArea->HandlePointerEventL(aPointerEvent);
   630     }
   635     }