From: Wonsik Jung Date: Wed, 27 May 2020 06:19:19 +0000 (+0900) Subject: [Tizen] Add check code with orientation in creating egl window. X-Git-Tag: accepted/tizen/unified/20200529.124323~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bcb13704d9e1cea2eac57657d02cd3bb93b5a0cd;p=platform%2Fcore%2Fuifw%2Fdali-adaptor-legacy.git [Tizen] Add check code with orientation in creating egl window. Sometimes, window rotation event occurs before eglwindow is created. eglWindow should be created with the size of 0's orientation. To fix, add check code with orientation in creating egl window. Change-Id: Ib55712662242072386f88f6a7d0f8508de91fb80 --- 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 9624c20..abbc8d4 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 @@ -1381,7 +1381,15 @@ int WindowBaseEcoreWl2::GetNativeWindowId() EGLNativeWindowType WindowBaseEcoreWl2::CreateEglWindow( int width, int height ) { - mEglWindow = wl_egl_window_create( mWlSurface, width, height ); + int totalAngle = (mWindowRotationAngle + mScreenRotationAngle) % 360; + if( totalAngle == 90 || totalAngle == 270 ) + { + mEglWindow = wl_egl_window_create( mWlSurface, height, width ); + } + else + { + mEglWindow = wl_egl_window_create( mWlSurface, width, height ); + } return static_cast< EGLNativeWindowType >( mEglWindow ); } @@ -1579,6 +1587,7 @@ void WindowBaseEcoreWl2::SetAvailableAnlges( const std::vector< int >& angles ) void WindowBaseEcoreWl2::SetPreferredAngle( int angle ) { + DALI_LOG_RELEASE_INFO( "WindowBaseEcoreWl2::SetPreferredAngle, angle: %d\n", angle ); ecore_wl2_window_preferred_rotation_set( mEcoreWindow, angle ); }