idlehomescreen/xmluirendering/renderingplugins/xntexteditorfactory/src/xntexteditoradapter.cpp
branchRCL_3
changeset 28 d721605b30d0
parent 26 1b758917cafc
--- a/idlehomescreen/xmluirendering/renderingplugins/xntexteditorfactory/src/xntexteditoradapter.cpp	Wed Jun 09 09:29:04 2010 +0300
+++ b/idlehomescreen/xmluirendering/renderingplugins/xntexteditorfactory/src/xntexteditoradapter.cpp	Mon Jun 21 15:27:11 2010 +0300
@@ -472,6 +472,42 @@
     }
 
 // -----------------------------------------------------------------------------
+// CXnTextEditorAdapter::HandlePointerEventL
+//
+// -----------------------------------------------------------------------------
+//
+void CXnTextEditorAdapter::HandlePointerEventL( const TPointerEvent& aPointerEvent )
+    {
+    TPointerEvent pointerEvent( aPointerEvent ); 
+    TRect rect( iEditor->TextView()->ViewRect() );
+    TPoint point( aPointerEvent.iPosition );
+    
+    // this opens partial screen also when margin is tapped
+    if( !IsFlagSet( iSplitInputFlags, ESplitInputOpen ) )
+        {
+        if( point.iX < rect.iTl.iX )
+            {
+            pointerEvent.iPosition.iX = rect.iTl.iX;
+            }
+        else if( point.iX > rect.iBr.iX )
+            {
+            pointerEvent.iPosition.iX = rect.iBr.iX;
+            }
+        
+        if( point.iY < rect.iTl.iY )
+            {
+            pointerEvent.iPosition.iY = rect.iTl.iY;
+            }
+        else if( point.iY > rect.iBr.iY )
+            {
+            pointerEvent.iPosition.iY = rect.iBr.iY;
+            }
+        }
+    
+    CXnControlAdapter::HandlePointerEventL( pointerEvent );
+    }
+
+// -----------------------------------------------------------------------------
 // CXnTextEditorAdapter::HandleScreenDeviceChangedL
 //
 // -----------------------------------------------------------------------------