From 9d38bd4400e1f7224fe96f8975e1f7532f6e6d94 Mon Sep 17 00:00:00 2001 From: Choi Munseok Date: Mon, 8 Apr 2013 19:54:26 +0900 Subject: [PATCH] Fix Rotation Change-Id: Ied8e41794c130615a33dce5d821136e45ecd4b88 Signed-off-by: Choi Munseok --- src/ui/FUi_EcoreEvas.cpp | 55 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/src/ui/FUi_EcoreEvas.cpp b/src/ui/FUi_EcoreEvas.cpp index 23d0196..c5063b9 100644 --- a/src/ui/FUi_EcoreEvas.cpp +++ b/src/ui/FUi_EcoreEvas.cpp @@ -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); } -- 2.7.4