Revert "[Tizen] Fix Window-rotation's bugs"
authorWonsik Jung <sidein@samsung.com>
Thu, 19 Dec 2019 02:06:41 +0000 (11:06 +0900)
committerWonsik Jung <sidein@samsung.com>
Thu, 19 Dec 2019 02:06:41 +0000 (11:06 +0900)
This reverts commit f76905fe3551db80b96a63be4a302190b91e37b9.

dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h
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 d807f8c..5495b17 100644 (file)
@@ -654,11 +654,6 @@ void WindowBaseEcoreWl::Initialize( PositionSize positionSize, Any surface, bool
     CreateWindow( positionSize );
   }
 
-  for( int i = 0; i < 4; ++i )
-  {
-    mAvaiableWindowOrientations[i] = 0;
-  }
-
   mWlSurface = ecore_wl_window_surface_create( mEcoreWindow );
 
   SetTransparency( isTransparent );
@@ -1371,12 +1366,12 @@ void WindowBaseEcoreWl::Activate()
 
 void WindowBaseEcoreWl::SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations )
 {
-  std::size_t size = orientations.size();
-  for( std::size_t i = 0; i < size; ++i )
+  int rotations[4] = { 0 };
+  for( std::size_t i = 0; i < orientations.size(); ++i )
   {
-    mAvaiableWindowOrientations[i] = static_cast< int >( orientations[i] );
+    rotations[i] = static_cast< int >( orientations[i] );
   }
-  ecore_wl_window_rotation_available_rotations_set( mEcoreWindow, mAvaiableWindowOrientations, size );
+  ecore_wl_window_rotation_available_rotations_set( mEcoreWindow, rotations, orientations.size() );
 }
 
 void WindowBaseEcoreWl::SetPreferredOrientation( Dali::Window::WindowOrientation orientation )
index 8b87802..de04a33 100644 (file)
@@ -489,8 +489,6 @@ private:
   int                                  mWindowRotationAngle;
   int                                  mScreenRotationAngle;
   int                                  mSupportedPreProtation;
-
-  int                                  mAvaiableWindowOrientations[4];
 #ifdef DALI_ELDBUS_AVAILABLE
   Eldbus_Connection*                   mSystemConnection;
 #endif // DALI_ELDBUS_AVAILABLE
index 4daf6d7..e7eb680 100755 (executable)
@@ -779,11 +779,6 @@ 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 );
@@ -1546,12 +1541,12 @@ void WindowBaseEcoreWl2::Activate()
 
 void WindowBaseEcoreWl2::SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations )
 {
-  std::size_t size = orientations.size();
-  for( std::size_t i = 0; i < size; ++i )
+  int rotations[4] = { 0 };
+  for( std::size_t i = 0; i < orientations.size(); ++i )
   {
-    mAvaiableWindowOrientations[i] = static_cast< int >( orientations[i] );
+    rotations[i] = static_cast< int >( orientations[i] );
   }
-  ecore_wl2_window_available_rotations_set( mEcoreWindow, mAvaiableWindowOrientations, size );
+  ecore_wl2_window_available_rotations_set( mEcoreWindow, rotations, orientations.size() );
 }
 
 void WindowBaseEcoreWl2::SetPreferredOrientation( Dali::Window::WindowOrientation orientation )
index ad6b805..e176399 100644 (file)
@@ -503,8 +503,6 @@ private:
   int                                  mWindowRotationAngle;
   int                                  mScreenRotationAngle;
   int                                  mSupportedPreProtation;
-
-  int                                  mAvaiableWindowOrientations[4];
 #ifdef DALI_ELDBUS_AVAILABLE
   Eldbus_Connection*                   mSystemConnection;
 #endif // DALI_ELDBUS_AVAILABLE