X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fwindow-impl.cpp;h=d5f838304c1e6877e2d95d383307957b4dc67825;hb=1806816d0c6af45354de742d27fc6f25ddc145d5;hp=7759dadd3c65088ba753a822a1bd98f55ba7aed1;hpb=69cd7a3fa9659975702ab19d988760259f392458;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 7759dad..d5f8383 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -454,7 +454,13 @@ void Window::SetSize( Dali::Window::WindowSize size ) { Uint16Pair newSize( newRect.width, newRect.height ); - SurfaceResized(); + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } + + SurfaceResized( forceUpdate ); mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize ); @@ -512,7 +518,13 @@ void Window::SetPositionSize( PositionSize positionSize ) { Uint16Pair newSize( newRect.width, newRect.height ); - SurfaceResized(); + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } + + SurfaceResized( forceUpdate ); mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize ); @@ -590,8 +602,13 @@ void Window::OnFocusChanged( bool focusIn ) void Window::OnOutputTransformed() { + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } PositionSize positionSize = mSurface->GetPositionSize(); - SurfaceResized(); + SurfaceResized( forceUpdate ); mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) ); mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) ); } @@ -627,16 +644,22 @@ void Window::OnRotation( const RotationEvent& rotation ) mWindowSurface->RequestRotation( mRotationAngle, mWindowWidth, mWindowHeight ); - SurfaceResized(); + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } + + SurfaceResized( forceUpdate ); - mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mRotationAngle, mWindowHeight ) ); + mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) ); // Emit signal Dali::Window handle( this ); - mResizedSignal.Emit( Dali::Window::WindowSize( mRotationAngle, mWindowHeight ) ); - mResizeSignal.Emit( handle, Dali::Window::WindowSize( mRotationAngle, mWindowHeight ) ); + mResizedSignal.Emit( Dali::Window::WindowSize( mWindowWidth, mWindowHeight ) ); + mResizeSignal.Emit( handle, Dali::Window::WindowSize( mWindowWidth, mWindowHeight ) ); - mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( mRotationAngle, mWindowHeight ) ); + mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) ); } void Window::OnPause() @@ -708,20 +731,20 @@ void Window::SetParent( Dali::Window& parent ) if ( DALI_UNLIKELY( parent ) ) { mParentWindow = parent; - Dali::Window grandParent = Dali::DevelWindow::GetParent( parent ); + Dali::Window self = Dali::Window( this ); // check circular parent window setting - if ( DALI_UNLIKELY( grandParent ) && mWindowBase->IsMatchedWindow( grandParent.GetNativeHandle() ) ) + if ( Dali::DevelWindow::GetParent( parent ) == self ) { Dali::DevelWindow::Unparent( parent ); } - mWindowBase->SetParent( parent.GetNativeHandle() ); + mWindowBase->SetParent( GetImplementation( mParentWindow ).mWindowBase ); } } void Window::Unparent() { - Any parent; - mWindowBase->SetParent( parent ); + mWindowBase->SetParent( nullptr ); + mParentWindow.Reset(); } Dali::Window Window::GetParent()