From 21a45d2827dbaf8cc7b9f75211d30d41fa4ae1ea Mon Sep 17 00:00:00 2001 From: Paul Wisbey Date: Mon, 9 Jun 2014 16:26:24 +0900 Subject: [PATCH] Allow gestures to be registered before Adaptor::Start() 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 | 2 -- adaptors/tizen/internal/common/events/gesture-manager.cpp | 12 +----------- adaptors/tizen/internal/common/events/gesture-manager.h | 5 ----- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/adaptors/tizen/internal/common/events/event-handler.cpp b/adaptors/tizen/internal/common/events/event-handler.cpp index 06ba01f..8e292da 100644 --- a/adaptors/tizen/internal/common/events/event-handler.cpp +++ b/adaptors/tizen/internal/common/events/event-handler.cpp @@ -1110,8 +1110,6 @@ EventHandler::EventHandler( RenderSurface* surface, CoreEventInterface& coreEven } mImpl = new Impl(this, window); - - mGestureManager.Start(); } EventHandler::~EventHandler() diff --git a/adaptors/tizen/internal/common/events/gesture-manager.cpp b/adaptors/tizen/internal/common/events/gesture-manager.cpp index 6546a04..8a9dc98 100644 --- a/adaptors/tizen/internal/common/events/gesture-manager.cpp +++ b/adaptors/tizen/internal/common/events/gesture-manager.cpp @@ -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) diff --git a/adaptors/tizen/internal/common/events/gesture-manager.h b/adaptors/tizen/internal/common/events/gesture-manager.h index 5a482fc..7003a0b 100644 --- a/adaptors/tizen/internal/common/events/gesture-manager.h +++ b/adaptors/tizen/internal/common/events/gesture-manager.h @@ -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(); -- 2.7.4