[4.0] Supports screen rotation.
[platform/core/uifw/dali-adaptor.git] / adaptors / ecore / wayland / window-impl-ecore-wl.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 0e01ff2..8437a6b
@@ -227,10 +227,10 @@ struct Window::EventHandler
       ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) );
       if( wlSurface )
       {
-        wlSurface->OutputTransformed();
+        int orientation = wlSurface->OutputTransformed();
 
         PositionSize positionSize = wlSurface->GetPositionSize();
-        handler->mWindow->mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+        handler->mWindow->mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ), orientation );
         handler->mWindow->mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
       }
     }
@@ -251,10 +251,10 @@ struct Window::EventHandler
       ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) );
       if( wlSurface )
       {
-        wlSurface->OutputTransformed();
+        int orientation = wlSurface->OutputTransformed();
 
         PositionSize positionSize = wlSurface->GetPositionSize();
-        handler->mWindow->mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+        handler->mWindow->mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ), orientation );
         handler->mWindow->mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
       }
     }
@@ -890,7 +890,7 @@ void Window::RemoveAvailableOrientation(Dali::Window::WindowOrientation orientat
 
 void Window::SetAvailableOrientations(const std::vector<Dali::Window::WindowOrientation>& orientations)
 {
-  int rotations[4];
+  int rotations[4] = { 0 };
   for( std::size_t i = 0; i < mAvailableOrientations.size(); ++i )
   {
     rotations[i] = static_cast< int >( mAvailableOrientations[i] );