webengine/webkitutils/stmgesturefw/src/stateengine.cpp
branchRCL_3
changeset 37 ac77f89b1d9e
parent 28 d39add9822e2
child 46 30342f40acbf
--- a/webengine/webkitutils/stmgesturefw/src/stateengine.cpp	Wed Mar 31 23:16:40 2010 +0300
+++ b/webengine/webkitutils/stmgesturefw/src/stateengine.cpp	Wed Apr 14 17:06:56 2010 +0300
@@ -487,6 +487,7 @@
     m_timerif = atimerif ;
     m_currentState = EInit ;
     m_index = aIndex ;
+    isStatemachineBlocked = false;
 }
 
 CStateEngine::~CStateEngine()
@@ -941,9 +942,11 @@
 {
     // We get an event into m_hwe by this moment, lets kick the state machine
     m_wasFiltered = ETrue ;
+    if (isStatemachineBlocked)
+        return m_wasFiltered;
 
     CalculateDelta() ;
-    turnStateMachine() ;
+    turnStateMachine();
 
     m_previousPointerEventPosition = m_hwe.iPosition ;
     return m_wasFiltered ;
@@ -1085,6 +1088,7 @@
     m_eventConsumed = false ;   // run the loop until the event has been consumed
     // Now run trough the motions of the state elements, and prepare to change to next state while doing so.
     // If the state elements set the m_eventConsumed then all is done
+    isStatemachineBlocked = true;
     while (!m_eventConsumed)
     {
         int i = 0 ;
@@ -1131,6 +1135,7 @@
         if (m_config->m_enableLogging) DebugPrintState(nextState) ;
         m_currentState = nextState ;    // Change to the next state
     }
+    isStatemachineBlocked = false;
 }
 TTimeIntervalMicroSeconds CStateEngine::getInterval()
 {