Resolved the AppWidgetLayer crash
authorChoi Munseok <ms47.choi@samsung.com>
Sat, 8 Jun 2013 02:26:05 +0000 (11:26 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Sat, 8 Jun 2013 02:26:05 +0000 (11:26 +0900)
Change-Id: I7a2afec52d07266dc08860933f3b4d4e21e68347
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/ui/animations/FUiAnim_EflLayer.cpp
src/ui/inc/FUiAnim_EflLayer.h

index 2f1d4b3..840389b 100644 (file)
@@ -272,6 +272,7 @@ _EflLayer::_EflLayer(void)
        , _needAsyncVisibilityChangeRequest(true)
        , _isMainType(true)
        , _needRender(true)
+       , __isWinObject(true)
 {
        _countOfLayer++;
 }
@@ -292,6 +293,7 @@ _EflLayer::_EflLayer(bool isMainType)
        , _needAsyncVisibilityChangeRequest(true)
        , _isMainType(isMainType)
        , _needRender(true)
+       , __isWinObject(true)
 {
        _countOfLayer++;
 }
@@ -399,6 +401,8 @@ _EflLayer::OnConstructed(void)
 result
 _EflLayer::Initialize(Evas_Object* pWindow)
 {
+       const char* pType = null;
+
        _pWindow = pWindow;
        SysTryCatch(NID_UI, _pWindow, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred.");
        _pEvas = evas_object_evas_get(_pWindow);
@@ -406,6 +410,12 @@ _EflLayer::Initialize(Evas_Object* pWindow)
        _pEcoreEvas = ecore_evas_ecore_evas_get(_pEvas);
        SysTryCatch(NID_UI, _pEcoreEvas, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred.");
 
+       pType = evas_object_type_get(_pWindow);
+       if (strcmp("elm_win", pType))
+       {
+               __isWinObject = false;
+       }
+
 // CHECK ME: Is this needed for GL mode?
 #ifdef _NEED_DAMAGE_HANDER_
        if(_pOnWindowDamagedHandler == null)
@@ -488,7 +498,11 @@ _EflLayer::GetBounds(void) const
                int h = 0;
 
                evas_object_geometry_get(_pWindow, null, null, &w, &h);
-               elm_win_screen_position_get(_pWindow, &x, &y);
+
+               if (__isWinObject == true)
+               {
+                       elm_win_screen_position_get(_pWindow, &x, &y);
+               }
 
                return FloatRectangle(x, y, w, h);
        }
@@ -560,7 +574,11 @@ _EflLayer::SetOpacity(float opacity)
        if (_FloatCompare(opacity, 1.0f))
        {
 //             ecore_evas_alpha_set(_pEcoreEvas, EINA_FALSE);
-               elm_win_alpha_set(_pWindow, EINA_FALSE);
+               if (__isWinObject == true)
+               {
+                       elm_win_alpha_set(_pWindow, EINA_FALSE);
+               }
+
                int r,g,b,a;
                evas_object_color_get(_pWindow, &r, &g, &b, &a);
                evas_object_color_set(_pWindow, r, g, b, 255);
@@ -570,7 +588,10 @@ _EflLayer::SetOpacity(float opacity)
        {
 
 //             ecore_evas_alpha_set(_pEcoreEvas, EINA_TRUE);
-               elm_win_alpha_set(_pWindow, EINA_TRUE);
+               if (__isWinObject == true)
+               {
+                       elm_win_alpha_set(_pWindow, EINA_TRUE);
+               }
 
                int r,g,b,a;
                evas_object_color_get(_pWindow, &r, &g, &b, &a);
index d65a64c..4ff0139 100644 (file)
@@ -128,6 +128,9 @@ protected:
        bool _needRender;
 
        static int _countOfLayer;
+
+private:
+       bool __isWinObject;
 };
 
 }}} //namespace Tizen { namespace Ui { namespace Animations