(Touch) Ensure touch-events are cleared before emitting to stage and documentation... 92/24092/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 27 Jun 2014 16:10:10 +0000 (01:10 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 8 Jul 2014 13:19:39 +0000 (14:19 +0100)
[problem]     Stage signal has the wrong touch-event information.
[cause]       We change it when we emit the interrupted event for the original down actor.
[solution]    Revert to original.

Change-Id: Ib93364a8df74204c5f15c8d33e264189dc1a752c
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
capi/dali/public-api/actors/actor.h
dali/internal/event/events/touch-event-processor.cpp

index b9b5fcf..8649edd 100644 (file)
@@ -202,7 +202,10 @@ typedef ActorContainer::const_iterator ActorConstIter; ///< Const iterator for D
  * - Interrupted State
  *   - If a system event occurs which interrupts the touch processing, then the last primary hit
  *     actor's touch signals are emitted with an "Interrupted" state.
- *   - If the last primary hit actor, or one of its parents, is no longer touchable, then its touch signals are also emitted with an "Interrupted" state.
+ *   - If the last primary hit actor, or one of its parents, is no longer touchable, then its
+ *     touch signals are also emitted with an "Interrupted" state.
+ *   - If the consumed actor on touch-down is not the same as the consumed actor on touch-up, then
+ *     touch signals are also emitted from the touch-down actor with an "Interrupted" state.
  * <h3>Key Events:</h3>
  *
  * Key events are received by an actor once set to grab key events, only one actor can be set as focused.
index bc4e061..e561ebc 100644 (file)
@@ -460,6 +460,10 @@ void TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& even
           touchEvent.points[0].hitActor = touchDownConsumedActorHandle;
           touchEvent.points[0].state = TouchPoint::Interrupted;
           EmitTouchSignals( touchDownConsumedActorHandle, touchEvent );
+
+          // Restore touch-event to original state
+          touchEvent.points[0].hitActor = primaryHitActor;
+          touchEvent.points[0].state = primaryPointState;
         }
 
         mTouchDownConsumedActor.SetActor( NULL );