void CWsBackedUpWindow::Scroll(const TRect &aClipRect, const TPoint &aOffset,const TRect &aRect)
	{
	TRect winBorder=TRect(iWsWin->Size());
	TRect clipRect=aClipRect;
	TRect srcRect = aRect;		
	clipRect.Intersection(winBorder);	
	if (!clipRect.IsEmpty())
		{	// If we have to do something (a visible part will change)
		srcRect.Intersection(clipRect);

		STACK_REGION regionToClear;
		regionToClear.AddRect(aRect);
		regionToClear.SubRect(srcRect);
		regionToClear.Offset(aOffset);
		
		ActivateGc();
		iBitGc->SetClippingRect(clipRect);
		iBitGc->SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
		iBitGc->CopyRect(aOffset,srcRect);				
		for (TInt k=0;k<regionToClear.Count();k++)
			{
			iBitGc->Clear(regionToClear[k]);
			}
		iBitGc->SetClippingRect(winBorder);
		iBitGc->SetDrawMode(CGraphicsContext::EDrawModePEN);
		TRegionFix<1> fixRegion(iWsWin->AbsRect());
		UpdateScreen(fixRegion);
		regionToClear.Close();
		}
	}
/**
This function selects the desired behaviour depending on whether the screen is
run in CHANGETRACKING mode or not. 
@param aRegion in screen coordinates
*/
void CWsBackedUpWindow::UpdateScreen(const TRegion& aRegion)
	{
	if (Screen()->ChangeTracking())
		{
		STACK_REGION region;
		region.Copy(aRegion);
		region.Offset(-WsWin()->Origin()); //convert to window coordinates 
		MarkDirtyAndSchedule(region);
		region.Close();		
		}
	else
		{
		Screen()->AddRedrawRegion(aRegion);
		}
	}