diff --git a/src/eepp/ui/uitouchdragablewidget.cpp b/src/eepp/ui/uitouchdragablewidget.cpp index 8f8e36b85..343546e32 100644 --- a/src/eepp/ui/uitouchdragablewidget.cpp +++ b/src/eepp/ui/uitouchdragablewidget.cpp @@ -53,7 +53,6 @@ void UITouchDragableWidget::update() { if ( mFlags & UI_TOUCH_DRAG_ENABLED ) { UIManager * manager = UIManager::instance(); Uint32 Press = manager->getPressTrigger(); - Uint32 LPress = manager->getLastPressTrigger(); if ( ( mControlFlags & UI_CTRL_FLAG_TOUCH_DRAGGING ) ) { // Mouse Not Down @@ -77,22 +76,17 @@ void UITouchDragableWidget::update() { mTouchDragPoint = Pos; manager->setControlDragging( true ); - - //eePRINTL( "elapsed.x: %.4f diff: %.4f mTouchDragAcceleration: %.4f eq: %.4f", elapsed.y, diff.y, mTouchDragAcceleration.y, elapsed.y * diff.y ); } else { mTouchDragAcceleration -= elapsed * mTouchDragDeceleration; - - //eePRINTL( "elapsed.x: %.2f mTouchDragAcceleration: %.4f eq: %.4f", elapsed.y, mTouchDragAcceleration.y, elapsed.y * mTouchDragDeceleration.y ); } } else { // Mouse Down if ( isTouchOverAllowedChilds() ) { - if ( !( LPress & EE_BUTTON_LMASK ) && ( Press & EE_BUTTON_LMASK ) ) { + if ( Press & EE_BUTTON_LMASK ) { writeCtrlFlag( UI_CTRL_FLAG_TOUCH_DRAGGING, 1 ); mTouchDragPoint = Vector2f( manager->getMousePos().x, manager->getMousePos().y ); mTouchDragAcceleration = Vector2f(0,0); - //eePRINTL( "reset acceleration." ); } } @@ -127,8 +121,6 @@ void UITouchDragableWidget::update() { } onTouchDragValueChange( mTouchDragAcceleration ); - - //eePRINTL( "mTouchDragAcceleration: %.4f deaccelerated: %.4f", mTouchDragAcceleration.y, mTouchDragDeceleration.y * ms ); } } } diff --git a/src/eepp/window/input.cpp b/src/eepp/window/input.cpp index 9e7600345..6e9ad07d1 100644 --- a/src/eepp/window/input.cpp +++ b/src/eepp/window/input.cpp @@ -88,6 +88,7 @@ void Input::processEvent( InputEvent * Event ) { case InputEvent::MouseButtonDown: { mPressTrigger |= EE_BUTTON_MASK( Event->button.button ); + break; } case InputEvent::MouseButtonUp: @@ -146,6 +147,10 @@ void Input::processEvent( InputEvent * Event ) { Finger->xdelta = Event->finger.dx; Finger->ydelta = Event->finger.dy; + if ( 0 == Event->finger.fingerId ) { + mPressTrigger |= EE_BUTTON_LMASK; + } + break; } case InputEvent::FingerUp: @@ -161,6 +166,10 @@ void Input::processEvent( InputEvent * Event ) { Finger->xdelta = Event->finger.dx; Finger->ydelta = Event->finger.dy; + if ( 0 == Event->finger.fingerId ) { + mPressTrigger &= ~EE_BUTTON_LMASK; + } + break; } case InputEvent::FingerMotion: @@ -175,6 +184,10 @@ void Input::processEvent( InputEvent * Event ) { Finger->xdelta = Event->finger.dx; Finger->ydelta = Event->finger.dy; + if ( 0 == Event->finger.fingerId ) { + mPressTrigger |= EE_BUTTON_LMASK; + } + break; } case InputEvent::VideoResize: