[4.0] Add an environment variable to set the default indicator visible mode
[platform/core/uifw/dali-adaptor.git] / adaptors / ecore / wayland / window-impl-ecore-wl.cpp
index 971be10..0552fe0 100644 (file)
@@ -210,8 +210,17 @@ struct Window::EventHandler
 
     if ( handler && handler->mWindow && transformEvent->output == ecore_wl_window_output_find( handler->mEcoreWindow ) )
     {
+      DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) EcoreEventOutputTransform\n", handler->mEcoreWindow );
+
       ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) );
-      wlSurface->OutputTransformed();
+      if( wlSurface )
+      {
+        wlSurface->OutputTransformed();
+
+        PositionSize positionSize = wlSurface->GetPositionSize();
+        handler->mWindow->mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+        handler->mWindow->mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+      }
     }
 
     return ECORE_CALLBACK_PASS_ON;
@@ -225,8 +234,17 @@ struct Window::EventHandler
 
     if ( handler && handler->mWindow && ignoreTransformEvent->win == handler->mEcoreWindow )
     {
+      DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) EcoreEventIgnoreOutputTransform\n", handler->mEcoreWindow );
+
       ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) );
-      wlSurface->OutputTransformed();
+      if( wlSurface )
+      {
+        wlSurface->OutputTransformed();
+
+        PositionSize positionSize = wlSurface->GetPositionSize();
+        handler->mWindow->mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+        handler->mWindow->mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+      }
     }
 
     return ECORE_CALLBACK_PASS_ON;
@@ -882,12 +900,17 @@ void Window::RotationDone( int orientation, int width, int height )
     wlSurface->RequestRotation( orientation, width, height );
   }
 
-  mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( width, height ) );
+  mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( width, height ) );
 
   // Emit signal
   mResizedSignal.Emit( Dali::DevelWindow::WindowSize( width, height ) );
 
-  mAdaptor->SurfaceResizeComplete( Dali::Adaptor::SurfaceSize( width, height ) );
+  mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( width, height ) );
+}
+
+void Window::SetIndicatorVisibleMode( Dali::Window::IndicatorVisibleMode mode )
+{
+  mIndicatorVisible = mode;
 }
 
 unsigned int Window::GetSupportedAuxiliaryHintCount()
@@ -1419,12 +1442,12 @@ void Window::SetSize( Dali::DevelWindow::WindowSize size )
 
     mSurface->MoveResize( positionSize );
 
-    mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+    mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
 
     // Emit signal
     mResizedSignal.Emit( Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height ) );
 
-    mAdaptor->SurfaceResizeComplete( Dali::Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+    mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
   }
 }