[Tizen] Add rotation's values to winBase-wl2
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 28 May 2020 05:19:34 +0000 (14:19 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 28 May 2020 05:19:37 +0000 (14:19 +0900)
Change-Id: I1958156c7292d70f9bda59883efb38f6221c2e11

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 8c2c04a..9624c20 100755 (executable)
@@ -760,6 +760,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 );
@@ -1562,14 +1567,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 bd4afb5..83d06d2 100644 (file)
@@ -515,6 +515,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