qstmgesturelib/recognisers/qstmpangesturerecogniser.cpp
changeset 16 3c88a81ff781
parent 3 0954f5dd2cd0
--- a/qstmgesturelib/recognisers/qstmpangesturerecogniser.cpp	Thu Sep 23 15:32:11 2010 -0400
+++ b/qstmgesturelib/recognisers/qstmpangesturerecogniser.cpp	Fri Oct 15 17:30:59 2010 -0400
@@ -53,7 +53,7 @@
             // should we check that all of the events are targeted to our window?
             // currently we only check if the last one is for us and is EMove, then we pan if the speed is OK
             if (m_loggingenabled) {
-            	LOGARG("QStm_PanGestureRecogniser: Got: numer of events %d, event code %d", countOfEvents, eventCode);
+                LOGARG("QStm_PanGestureRecogniser: Got: numer of events %d, event  %s", countOfEvents, event_name(eventCode));
             }
         	
             if (puie->target() == m_powner &&
@@ -67,7 +67,8 @@
                 }
                 
                 // It is pan gesture in our window, handle it, if the speed is inside limits
-                if (speed > m_panningspeedlow && speed < m_panningspeedhigh) {
+                if (speed >= m_panningspeedlow && speed < m_panningspeedhigh && 
+                    (puie->currentXY() != puie->previousXY())) {
                     using qstmUiEventEngine::QStm_UiEventSpeed;
 
                     state = EGestureActive;
@@ -77,6 +78,7 @@
                                     KUid,
                                     puie->currentXY(),
                                     puie->previousXY(),
+                                    puie->timestamp(),
                                     &speedIf,
                                     m_loggingenabled);
                     pgest.setTarget(puie->target());
@@ -85,11 +87,8 @@
                     m_listener->gestureEnter(pgest);
                 }
             }
-            else if (eventCode == qstmUiEventEngine::ERelease) {
-            	LOGARG("QStm_PanGestureRecogniser::recognise: (0x%x) eventCode == ERelease", this);
             }
         }
-    }
     m_state = state;
     return state;
 }
@@ -106,6 +105,7 @@
                     KUid,
                     puie->currentXY(),
                     puie->previousXY(),
+                    puie->timestamp(),
                     &speedIf,
                     m_loggingenabled);
 	pgest.setTarget(puie->target());