Fixed a display error when minimize navigation app
authorBongjoo Seo <bongjoo.seo@samsung.com>
Thu, 22 Aug 2013 06:23:03 +0000 (15:23 +0900)
committerBongjoo Seo <bongjoo.seo@samsung.com>
Thu, 22 Aug 2013 06:23:03 +0000 (15:23 +0900)
Change-Id: I990eb8b34139acf0f5332f14db4fb10095b2101b
Signed-off-by: Bongjoo Seo <bongjoo.seo@samsung.com>
src/ui/animations/FUiAnim_EflLayer.cpp

index 05426cb..1f5ac48 100644 (file)
@@ -99,13 +99,20 @@ OnXWindowConfigured(void* pData, int type, void* pEventInfo)
 
                if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
                {
-                       int w, h;
+                       int w, h, rw, rh;
                        FloatRectangle bounds = pLayer->GetBounds();
+                       int orientation = ecore_evas_rotation_get(pLayer->GetEcoreEvas());
+                       Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas());
+                       Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, orientation, null, null, &rw, &rh);
+
                        evas_output_size_get(pLayer->GetEvas(), &w, &h);
-                       pLayer->SetConfigured(true);
 
-                       //if (w == (int)bounds.width && h == (int)bounds.height)
+                       if ( ((orientation % 180) == 0 && pEvent->w == (int)bounds.width && pEvent->h == (int)bounds.height)
+                                || ((orientation % 180) == 90 && pEvent->h == (int)bounds.width && pEvent->w == (int)bounds.height)
+                                || (ret && rw == pEvent->w && rh == pEvent->h)
+                                )
                        {
+                               pLayer->SetConfigured(true);
                                evas_damage_rectangle_add(pLayer->GetEvas(), 0, 0, w, h);
                                _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
                                if (pDisplayManager)
@@ -528,6 +535,14 @@ _EflLayer::SetOrientationChanged(int orientation)
                _isConfigured = true;
        }
        PRINT("[%#x | %#x] Called SetOrientationChanged(%d->%d) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), __orientation, orientation);
+
+       if (__orientation % 180 != orientation % 180)
+       {
+               float temp = __bounds.width;
+               __bounds.width = __bounds.height;
+               __bounds.height = temp;
+       }
+
        __orientation = orientation;
        return E_SUCCESS;
 }
@@ -556,11 +571,9 @@ _EflLayer::SetBounds(const FloatRectangle& bounds)
        evas_object_move(_pWindow, bounds.x, bounds.y);
        PRINT("[%#x | %#x] evas_object_move(%f, %f) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), bounds.x, bounds.y);
 
-       //int w, h;
-       //evas_output_size_get(_pEvas, &w, &h);
        if ((__bounds.width != bounds.width) || (__bounds.height != bounds.height))
        {
-               //_isConfigured = false;
+               _isConfigured = false;
                evas_object_resize(_pWindow, bounds.width, bounds.height);
                PRINT("[%#x | %#x] evas_object_resize(%f, %f) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), bounds.width, bounds.height);
        }