Revert "[Tizen] Add screen and client rotation itself function"
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / window-impl.cpp
index 2ef0962..7759dad 100644 (file)
@@ -43,7 +43,6 @@
 #include <dali/internal/window-system/common/window-base.h>
 #include <dali/internal/window-system/common/window-render-surface.h>
 #include <dali/internal/window-system/common/window-visibility-observer.h>
-#include <dali/devel-api/adaptor-framework/accessibility.h>
 
 namespace Dali
 {
@@ -93,17 +92,6 @@ Window::Window()
 
 Window::~Window()
 {
-  if ( mAdaptor )
-  {
-               auto bridge = Accessibility::Bridge::GetCurrentBridge();
-               auto accessible2 = mScene.GetRootLayer();
-               auto accessible = Accessibility::Accessible::Get( accessible2 );
-               bridge->RemoveTopLevelWindow( accessible );
-
-    mAdaptor->RemoveWindow( this );
-    mAdaptor = NULL;
-  }
-
   if ( mEventHandler )
   {
     mEventHandler->RemoveObserver( *this );
@@ -145,14 +133,6 @@ void Window::OnAdaptorSet(Dali::Adaptor& adaptor)
 {
   mEventHandler = EventHandlerPtr(new EventHandler( mWindowSurface, *mAdaptor ) );
   mEventHandler->AddObserver( *this );
-
-  auto bridge = Accessibility::Bridge::GetCurrentBridge();
-  auto v = mScene.GetRootLayer();
-  auto accessible = Accessibility::Accessible::Get( v, true );
-  bridge->AddTopLevelWindow( accessible );
-
-  //FIXME: line below is temporary solution for missing "activate" signal and should be removed
-  Show();
 }
 
 void Window::OnSurfaceSet( Dali::RenderSurfaceInterface* surface )
@@ -474,13 +454,7 @@ void Window::SetSize( Dali::Window::WindowSize size )
   {
     Uint16Pair newSize( newRect.width, newRect.height );
 
-    bool forceUpdate = false;
-    if( mWindowBase->IsEglWindowRotationSupported() )
-    {
-      forceUpdate = true;
-    }
-
-    SurfaceResized( forceUpdate );
+    SurfaceResized();
 
     mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
 
@@ -538,13 +512,7 @@ void Window::SetPositionSize( PositionSize positionSize )
   {
     Uint16Pair newSize( newRect.width, newRect.height );
 
-    bool forceUpdate = false;
-    if( mWindowBase->IsEglWindowRotationSupported() )
-    {
-      forceUpdate = true;
-    }
-
-    SurfaceResized( forceUpdate );
+    SurfaceResized();
 
     mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
 
@@ -618,29 +586,12 @@ void Window::OnFocusChanged( bool focusIn )
   Dali::Window handle( this );
   mFocusChangedSignal.Emit( focusIn );
   mFocusChangeSignal.Emit( handle, focusIn );
-
-  if (auto b = Dali::Accessibility::Bridge::GetCurrentBridge())
-  {
-    if (focusIn)
-    {
-      b->ApplicationShown();
-    }
-    else
-    {
-      b->ApplicationHidden();
-    }
-  }
 }
 
 void Window::OnOutputTransformed()
 {
-  bool forceUpdate = false;
-  if( mWindowBase->IsEglWindowRotationSupported() )
-  {
-    forceUpdate = true;
-  }
   PositionSize positionSize = mSurface->GetPositionSize();
-  SurfaceResized( forceUpdate );
+  SurfaceResized();
   mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
   mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
 }
@@ -676,22 +627,16 @@ void Window::OnRotation( const RotationEvent& rotation )
 
   mWindowSurface->RequestRotation( mRotationAngle, mWindowWidth, mWindowHeight );
 
-  bool forceUpdate = false;
-  if( mWindowBase->IsEglWindowRotationSupported() )
-  {
-    forceUpdate = true;
-  }
-
-  SurfaceResized( forceUpdate );
+  SurfaceResized();
 
-  mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) );
+  mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mRotationAngle, mWindowHeight ) );
 
   // Emit signal
   Dali::Window handle( this );
-  mResizedSignal.Emit( Dali::Window::WindowSize( mWindowWidth, mWindowHeight ) );
-  mResizeSignal.Emit( handle, Dali::Window::WindowSize( mWindowWidth, mWindowHeight ) );
+  mResizedSignal.Emit( Dali::Window::WindowSize( mRotationAngle, mWindowHeight ) );
+  mResizeSignal.Emit( handle, Dali::Window::WindowSize( mRotationAngle, mWindowHeight ) );
 
-  mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) );
+  mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( mRotationAngle, mWindowHeight ) );
 }
 
 void Window::OnPause()