[Tizen] Add rotation's values to winBase-wl2
authorJoogab Yun <joogab.yun@samsung.com>
Mon, 8 Jun 2020 10:21:18 +0000 (19:21 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Mon, 8 Jun 2020 10:21:22 +0000 (19:21 +0900)
This reverts commit 9016ac471b829c4bff172578642420e95ea0fabf.

Change-Id: Id2aff1ac2c3355a06caf6468520080820a36b71c

dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h

index 0a1bec4..be48236 100755 (executable)
@@ -762,6 +762,11 @@ void WindowBaseEcoreWl2::Initialize( PositionSize positionSize, Any surface, boo
     CreateWindow( positionSize );
   }
 
     CreateWindow( positionSize );
   }
 
+  for( int i = 0; i < 4; ++i )
+  {
+    mAvaiableWindowOrientations[i] = 0;
+  }
+
   mWlSurface = ecore_wl2_window_surface_get( mEcoreWindow );
 
   SetTransparency( isTransparent );
   mWlSurface = ecore_wl2_window_surface_get( mEcoreWindow );
 
   SetTransparency( isTransparent );
@@ -1570,14 +1575,14 @@ void WindowBaseEcoreWl2::Activate()
 
 void WindowBaseEcoreWl2::SetAvailableAnlges( const std::vector< int >& angles )
 {
 
 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() );
   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 )
 }
 
 void WindowBaseEcoreWl2::SetPreferredAngle( int angle )
index 764b7d4..4825a33 100644 (file)
@@ -518,6 +518,10 @@ private:
   int                                  mWindowRotationAngle;
   int                                  mScreenRotationAngle;
   int                                  mSupportedPreProtation;
   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
 #ifdef DALI_ELDBUS_AVAILABLE
   Eldbus_Connection*                   mSystemConnection;
 #endif // DALI_ELDBUS_AVAILABLE