Allow gestures to be registered before Adaptor::Start()
authorPaul Wisbey <p.wisbey@samsung.com>
Mon, 9 Jun 2014 07:26:24 +0000 (16:26 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 10 Jun 2014 16:01:37 +0000 (17:01 +0100)
Window::ShowIndicator was called before Adaptor::Start. This caused the first PanGesture to be
created before GestureManager::Start, which meant that no PanGestures could be registered.

Allow PanGestures to be registered, before Adaptor::Start()

adaptors/tizen/internal/common/events/event-handler.cpp
adaptors/tizen/internal/common/events/gesture-manager.cpp
adaptors/tizen/internal/common/events/gesture-manager.h

index 06ba01f..8e292da 100644 (file)
@@ -1110,8 +1110,6 @@ EventHandler::EventHandler( RenderSurface* surface, CoreEventInterface& coreEven
   }
 
   mImpl = new Impl(this, window);
-
-  mGestureManager.Start();
 }
 
 EventHandler::~EventHandler()
index 6546a04..8a9dc98 100644 (file)
@@ -102,7 +102,7 @@ GestureManager::GestureManager(CoreEventInterface& coreEventInterface, Vector2 s
   mScreenSize( screenSize ),
   mCallbackManager( callbackManager ),
   mMinimumDistanceDelta(-1.0f),
-  mRunning( false )
+  mRunning( true ) // This allows gestures to be created before Adaptor::Start() is called e.g. by Indicator
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Creating GestureManager\n" );
 }
@@ -132,16 +132,6 @@ void GestureManager::SendEvent(const Integration::TouchEvent& event)
   }
 }
 
-void GestureManager::Start()
-{
-  if (!mRunning)
-  {
-    DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Start\n" );
-
-    mRunning = true;
-  }
-}
-
 void GestureManager::Stop()
 {
   if (mRunning)
index 5a482fc..7003a0b 100644 (file)
@@ -75,11 +75,6 @@ public:
   void SendEvent(const Integration::TouchEvent& event);
 
   /**
-   * Used by the event handler to starts the GestureManager detection.
-   */
-  void Start();
-
-  /**
    * Used by the event handler to stop the GestureManager detection.
    */
   void Stop();