Fix Rotation
authorChoi Munseok <ms47.choi@samsung.com>
Mon, 8 Apr 2013 10:54:26 +0000 (19:54 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Mon, 8 Apr 2013 10:54:26 +0000 (19:54 +0900)
Change-Id: Ied8e41794c130615a33dce5d821136e45ecd4b88
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/ui/FUi_EcoreEvas.cpp

index 23d0196..c5063b9 100644 (file)
@@ -1218,10 +1218,23 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation)
                        break;
                }
 
+               int x = 0;
+               int y = 0;
+               int w = 0;
+               int h = 0;
+               Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
+
                evas_object_move(pWinObj, winX, winY);
-               evas_object_resize(pWinObj, winBounds.width, winBounds.height);
 
-               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, PARTIAL SCREEN] Rotate bounds(rot = %d, %d, %d, %d, %d).", win, orientation, winX, winY, winBounds.width, winBounds.height);
+               if (ret == EINA_FALSE)
+               {
+                       evas_object_resize(pWinObj, winBounds.width, winBounds.height);
+                       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, PARTIAL SCREEN] Rotate bounds(rot = %d, %d, %d, %d, %d).", win, orientation, winX, winY, winBounds.width, winBounds.height);
+               }
+               else
+               {
+                       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, PARTIAL SCREEN] Rotate bounds(rot = %d, %d, %d) ONLY MOVE.", win, orientation, winX, winY);
+               }
        }
 }
 
@@ -2149,10 +2162,23 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds)
                break;
        }
 
-       evas_object_move(pWinObject, winX, winY);
-       evas_object_resize(pWinObject, winBounds.width, winBounds.height);
+       int x = 0;
+       int y = 0;
+       int w = 0;
+       int h = 0;
+       Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
 
-       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+       evas_object_move(pWinObject, winX, winY);
+       
+       if (ret == EINA_FALSE)
+       {
+               evas_object_resize(pWinObject, winBounds.width, winBounds.height);
+               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+       }
+       else
+       {
+               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY);
+       }
 
        SetLastResult(E_SUCCESS);
 }
@@ -2203,10 +2229,23 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds)
                break;
        }
 
-       evas_object_move(pWinObject, winX, winY);
-       evas_object_resize(pWinObject, winBounds.width, winBounds.height);
+       int x = 0;
+       int y = 0;
+       int w = 0;
+       int h = 0;
+       Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
 
-       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+       evas_object_move(pWinObject, winX, winY);
+       
+       if (ret == EINA_FALSE)
+       {
+               evas_object_resize(pWinObject, winBounds.width, winBounds.height);
+               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+       }
+       else
+       {
+               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY);
+       }
 
        SetLastResult(E_SUCCESS);
 }