From 378d29d2bb7aa136351786eebe1428a2d2f69d81 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Mon, 8 Jun 2020 18:15:57 +0900 Subject: [PATCH] [Tizen] Add rotation's values to winBase-wl2 This reverts commit f003458dedf43c799664c538a7233d696eb56b74. Change-Id: I3f0d2e5dc7433f6452efaabea65cf10a400531df --- .../tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp | 15 ++++++++++----- .../tizen-wayland/ecore-wl2/window-base-ecore-wl2.h | 4 ++++ 2 files changed, 14 insertions(+), 5 deletions(-) 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 0a1bec4..be48236 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 @@ -762,6 +762,11 @@ void WindowBaseEcoreWl2::Initialize( PositionSize positionSize, Any surface, boo CreateWindow( positionSize ); } + for( int i = 0; i < 4; ++i ) + { + mAvaiableWindowOrientations[i] = 0; + } + mWlSurface = ecore_wl2_window_surface_get( mEcoreWindow ); SetTransparency( isTransparent ); @@ -1570,14 +1575,14 @@ void WindowBaseEcoreWl2::Activate() void WindowBaseEcoreWl2::SetAvailableAnlges( const std::vector< int >& angles ) { - int rotations[4] = { 0 }; DALI_LOG_RELEASE_INFO( "WindowBaseEcoreWl2::SetAvailableAnlges, angle's count: %d, angles\n", angles.size() ); - for( std::size_t i = 0; i < angles.size(); ++i ) + std::size_t size = angles.size(); + for( std::size_t i = 0; i < size; ++i ) { - rotations[i] = static_cast< int >( angles[i] ); - DALI_LOG_RELEASE_INFO( "%d ", rotations[i] ); + mAvaiableWindowOrientations[i] = static_cast< int >( angles[i] ); + DALI_LOG_RELEASE_INFO( "%d ", mAvaiableWindowOrientations[i] ); } - ecore_wl2_window_available_rotations_set( mEcoreWindow, rotations, angles.size() ); + ecore_wl2_window_available_rotations_set( mEcoreWindow, mAvaiableWindowOrientations, size ); } void WindowBaseEcoreWl2::SetPreferredAngle( int angle ) diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h index 764b7d4..4825a33 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h @@ -518,6 +518,10 @@ private: int mWindowRotationAngle; int mScreenRotationAngle; int mSupportedPreProtation; + + // Temporary solution to fix window rotation and window hide + // It will be removed when EFL patch is completed. + int mAvaiableWindowOrientations[4]; #ifdef DALI_ELDBUS_AVAILABLE Eldbus_Connection* mSystemConnection; #endif // DALI_ELDBUS_AVAILABLE -- 2.7.4