From f0b923f9a489b4b8a56c31f43fe4784080ae527e Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Fri, 2 Apr 2021 08:15:45 +0900 Subject: [PATCH] [Tizen] Modify ecore_wl2_window_geometry_set() with window rotation angle Ecore-wl2 window should have the original window size and send rotation event with swapped size. When window Hide() -> Show(), Show() function has the ecore_wl2_window_geomerty_set(). This function should be called to consider window rotation angle. Change-Id: I01bd97b5cb13be1bca4999806858e08b8c5e3c13 --- .../tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp index 7d923b6..4c91c35 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -1661,7 +1661,17 @@ void WindowBaseEcoreWl2::Show() { if(!mVisible) { - ecore_wl2_window_geometry_set(mEcoreWindow, mWindowPositionSize.x, mWindowPositionSize.y, mWindowPositionSize.width, mWindowPositionSize.height); + // Ecore-wl2 has the original window size + // and he always sends the window rotation event with the swapped size. + // So, to restore, dali should set the reswapped size(original window size) to ecore-wl2 for restoring. + if(mWindowRotationAngle == 0 || mWindowRotationAngle == 180) + { + ecore_wl2_window_geometry_set(mEcoreWindow, mWindowPositionSize.x, mWindowPositionSize.y, mWindowPositionSize.width, mWindowPositionSize.height); + } + else + { + ecore_wl2_window_geometry_set(mEcoreWindow, mWindowPositionSize.x, mWindowPositionSize.y, mWindowPositionSize.height, mWindowPositionSize.width); + } } mVisible = true; -- 2.7.4