From: Wonsik Jung Date: Thu, 22 Apr 2021 07:54:31 +0000 (+0900) Subject: Modify ecore_wl2_window_geometry_set() with window rotation angle X-Git-Tag: accepted/tizen/6.0/unified/20210422.132218^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F257305%2F1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git 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. It is the back porting from the latest Tizen to fix rotation issue Change-Id: Icea09d8fc55d25c3f7411a4266aedde3119c7d3a --- 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 e5ff6cd..6fbd2de 100755 --- 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 @@ -1695,9 +1695,19 @@ void WindowBaseEcoreWl2::SetAcceptFocus( bool accept ) void WindowBaseEcoreWl2::Show() { - if( !mVisible ) + 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;