bluetoothengine/bthid/mouse/Sesame_client/src/clientimagecommander.cpp
branchRCL_3
changeset 10 b6f55cd40afd
parent 0 f63038272f30
child 12 b23265fb36da
--- a/bluetoothengine/bthid/mouse/Sesame_client/src/clientimagecommander.cpp	Mon Mar 15 12:41:15 2010 +0200
+++ b/bluetoothengine/bthid/mouse/Sesame_client/src/clientimagecommander.cpp	Wed Mar 31 21:51:05 2010 +0300
@@ -175,6 +175,11 @@
     {
     // Could optionally decode the commands here
     DBG(RDebug::Print(_L("RImageCommander::ImageCommand %d"), aCommand));
+    if ( aCommand == KRedrawBTCursorAnim ) 
+        {
+        //reset the current location to avoid sudden jumping 
+        iCurrentPoint.SetXY(0,0);
+        }
 
     RAnim::Command( aCommand );
     
@@ -230,7 +235,6 @@
     return KErrNone;
     }
 
-
 TBool RImageCommander::RestrictPos()
     {
     TBool notInScreen(EFalse);
@@ -242,6 +246,12 @@
         TInt mode(screen->CurrentScreenMode());
         screen->GetScreenModeSizeAndRotation(mode, sizeAndRotation);
         }
+    
+    DBG(
+        RDebug::Print(_L("RImageCommander::RestrictPos sizeAndRotation.iPixelSize (%d,%d)"), sizeAndRotation.iPixelSize.iWidth, sizeAndRotation.iPixelSize.iHeight);
+        RDebug::Print(_L("RImageCommander::RestrictPos sizeAndRotation.iRotation (%d)"), sizeAndRotation.iRotation);
+        )
+
     TRect validRect(sizeAndRotation.iPixelSize);
     if (! validRect.Contains(iCurrentPoint))
         {
@@ -268,7 +278,11 @@
     DBG(
     if (outSide)
         {
-       RDebug::Print(_L("RImageCommander::CheckCurrentPoint not in screen (%d,%d)"), pos.iX, pos.iY);
+       RDebug::Print(_L("RImageCommander::CheckCurrentPoint NOT in screen (%d,%d)"), pos.iX, pos.iY);
+        }
+    else
+        {
+       RDebug::Print(_L("RImageCommander::CheckCurrentPoint DOES in screen (%d,%d)"), pos.iX, pos.iY);
         }
     )
     return outSide;