The following code snippet is taken from our typical main loops that are provided within the different Build Environments:
/* receive touch inputs and provide the application with them */
if ( EwBspGetTouchPosition( &touchPos ))
{
/* begin of touch cycle */
if ( touched == 0 )
CoreRoot__DriveCursorHitting( RootObject, 1, 0, touchPos );
/* movement during touch cycle */
else if ( touched == 1 )
CoreRoot__DriveCursorMovement( RootObject, touchPos );
touched = 1;
events = 1;
}
/* end of touch cycle */
else if ( touched == 1 )
{
CoreRoot__DriveCursorHitting( RootObject, 0, 0, touchPos );
touched = 0;
events = 1;
}
This ensures that at the end of a sequence of touch events the touch cycle is completed.
Best regards,
Manfred