javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcomposite.cpp
branchRCL_3
changeset 46 4376525cdefb
parent 34 71c436fe3ce0
child 60 6c158198356e
equal deleted inserted replaced
34:71c436fe3ce0 46:4376525cdefb
   443                     // Check if it is long enough to start the physics.
   443                     // Check if it is long enough to start the physics.
   444                     TPoint drag(iPhysicsStartPos - aPointerEvent.iPosition);
   444                     TPoint drag(iPhysicsStartPos - aPointerEvent.iPosition);
   445                     if (Abs(drag.iX) > iPhysics->DragThreshold()
   445                     if (Abs(drag.iX) > iPhysics->DragThreshold()
   446                             || Abs(drag.iY) > iPhysics->DragThreshold())
   446                             || Abs(drag.iY) > iPhysics->DragThreshold())
   447                     {
   447                     {
   448                         iPhysicsTimer->Cancel();
       
   449                         iPhysics->RegisterPanningPosition(drag);
       
   450                         iPhysicsAction = KSwtPhysicsPanning;
       
   451 
       
   452                         // Unfocus
   448                         // Unfocus
   453                         MSwtControl* ctrl = GetShell().FocusControl();
   449                         MSwtControl* ctrl = GetShell().FocusControl();
   454                         if (ctrl)
   450                         if (ctrl)
   455                         {
   451                         {
   456 #ifdef RD_JAVA_S60_RELEASE_9_2
   452 #ifdef RD_JAVA_S60_RELEASE_9_2
   472                             // This is safe for as long as there is no parallel pointer handling.
   468                             // This is safe for as long as there is no parallel pointer handling.
   473                             iDisplay.SetRevertPointerEvent(ETrue);
   469                             iDisplay.SetRevertPointerEvent(ETrue);
   474                             iPointerGrabbingControl->HandlePointerEventL(ev);
   470                             iPointerGrabbingControl->HandlePointerEventL(ev);
   475                             iDisplay.SetRevertPointerEvent(EFalse);
   471                             iDisplay.SetRevertPointerEvent(EFalse);
   476                         }
   472                         }
       
   473 
       
   474                         iPhysicsTimer->Cancel();
       
   475                         iPhysics->RegisterPanningPosition(drag);
       
   476                         iPhysicsAction = KSwtPhysicsPanning;
   477                     }
   477                     }
   478                 }
   478                 }
   479             }
   479             }
   480             break;
   480             break;
   481             case TPointerEvent::EButton1Up:
   481             case TPointerEvent::EButton1Up: