fix prevent, modify screenDpi performance
authorminkyu kim <imetjade.kim@samsung.com>
Wed, 3 Apr 2013 07:47:07 +0000 (16:47 +0900)
committerminkyu kim <imetjade.kim@samsung.com>
Wed, 3 Apr 2013 09:34:07 +0000 (18:34 +0900)
Change-Id: Iac3e22796be242c7973e61214872ecc22c71841b

src/ui/FUi_ControlImpl.cpp
src/ui/FUi_ControlManager.cpp
src/ui/FUi_EflUiEventManager.cpp
src/ui/FUi_ResourceManager.cpp
src/ui/inc/FUi_ControlManager.h

index c5b9be5..a516d08 100755 (executable)
@@ -690,7 +690,7 @@ public:
                                                pDragDropEventListener->OnTouchDragged(__public, _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition()), _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition()));
                                        }
                                        IDragDropEventListenerF* pDragDropEventListenerF = dynamic_cast <IDragDropEventListenerF*>(pDragListener);
-                                       if (pDragDropEventListener != null)
+                                       if (pDragDropEventListenerF != null)
                                        {
                                                pDragDropEventListenerF->OnTouchDraggedF(__public, touchInfo.GetCurrentPosition(), touchInfo.GetCurrentPosition());
                                        }
index 4373fa7..1df9582 100644 (file)
@@ -347,7 +347,6 @@ _ControlManager::_ControlManager(void) // [ToDo] exception check.
        _KeyEventManager::Initialize();
        _IndicatorManager::InitializeInstance();
        _AccessibilityManager::CreateInstance();
-       InitializeScreenDpi();
 
        SetLastResult(E_SUCCESS);
 
@@ -1255,9 +1254,9 @@ _ControlManager::GetScreenSizeF(void) const
 }
 
 void
-_ControlManager::InitializeScreenDpi()
+_ControlManager::SetScreenDpi(int dpi)
 {
-       Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/screen.dpi", __screenDpi);
+       __screenDpi = dpi;
 }
 
 int
index 4692cfd..8ea8151 100644 (file)
@@ -608,7 +608,11 @@ private:
                                Tizen::Graphics::Rectangle ownerRc((dynamic_cast<_Window*>(pCapturedControl)->GetOwner())->GetAbsoluteBounds());
                                if ((x >= ownerRc.x) && (x <= (ownerRc.x + ownerRc.width)) && (y >= ownerRc.y) && (y <= (ownerRc.y + ownerRc.height)))
                                {
-                                       pControl = dynamic_cast<_Window*>(pCapturedControl)->GetOwner();
+                                       _Window * pWindow = dynamic_cast<_Window*>(pCapturedControl);
+                                       if (pWindow)
+                                       {
+                                               pControl = pWindow->GetOwner();
+                                       }
                                }
 
                                Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds());
index 235c1d7..ccd404c 100755 (executable)
@@ -361,6 +361,8 @@ _ResourceManager::_ResourceManager(void)
        r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/screen.dpi", __deviceDPI);
        SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred");
 
+       _ControlManager::GetInstance()->SetScreenDpi(__deviceDPI);
+
        switch(appLogicalResolution)
        {
                case 240:
index c9ea27f..5a0ce1e 100644 (file)
@@ -82,7 +82,7 @@ public:
 // Informations
        Tizen::Graphics::Dimension GetScreenSize(void) const;
        Tizen::Graphics::FloatDimension GetScreenSizeF(void) const;
-       void InitializeScreenDpi(void);
+       void SetScreenDpi(int dpi);
        int GetScreenDpi(void) const;
 
 // Font