X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fwindow-impl.cpp;h=67bf27c190c4121cf63d6f71a67040e484fc1b13;hb=4f0263b1b86062f29fd77c365455e0bc2ce589c4;hp=fa8c7c160c52f62371d76f4be67a8e08480204c9;hpb=c8da363f5dc815e1241dec51e670bf8ba3caf2f6;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 fa8c7c1..67bf27c 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -92,6 +92,7 @@ Window::Window() mTransitionEffectEventSignal(), mKeyboardRepeatSettingsChangedSignal(), mAuxiliaryMessageSignal(), + mMovedSignal(), mLastKeyEvent(), mLastTouchEvent(), mIsTransparent(false), @@ -721,11 +722,18 @@ PositionSize Window::GetPositionSize() const void Window::SetPositionSize(PositionSize positionSize) { PositionSize oldRect = mSurface->GetPositionSize(); + Dali::Window handle(this); mWindowSurface->MoveResize(positionSize); PositionSize newRect = mSurface->GetPositionSize(); + if((oldRect.x != newRect.x) || (oldRect.y != newRect.y)) + { + Dali::Window::WindowPosition position(newRect.x, newRect.y); + mMovedSignal.Emit(handle, position); + } + // When surface size is updated, inform adaptor of resizing and emit ResizeSignal if((oldRect.width != newRect.width) || (oldRect.height != newRect.height)) { @@ -739,7 +747,6 @@ void Window::SetPositionSize(PositionSize positionSize) mAdaptor->SurfaceResizePrepare(mSurface.get(), newSize); DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), current angle (%d), SetPositionSize():resize signal [%d x %d]\n", this, mNativeWindowId, mRotationAngle, newRect.width, newRect.height); - Dali::Window handle(this); mResizeSignal.Emit(handle, newSize); mAdaptor->SurfaceResizeComplete(mSurface.get(), newSize); } @@ -873,23 +880,44 @@ void Window::OnWindowRedrawRequest() void Window::OnUpdatePositionSize(Dali::PositionSize& positionSize) { + bool resized = false; + bool moved = false; + Dali::Window handle(this); PositionSize oldRect = mSurface->GetPositionSize(); mWindowSurface->UpdatePositionSize(positionSize); PositionSize newRect = positionSize; - // When surface size is updated, inform adaptor of resizing and emit ResizeSignal + if((oldRect.x != newRect.x) || (oldRect.y != newRect.y)) + { + moved = true; + } + if((oldRect.width != newRect.width) || (oldRect.height != newRect.height)) { + resized = true; + } + + if(moved) + { + Dali::Window::WindowPosition position(newRect.x, newRect.y); + mMovedSignal.Emit(handle, position); + } + + // When surface size is updated, inform adaptor of resizing and emit ResizeSignal + if(resized) + { Uint16Pair newSize(newRect.width, newRect.height); + mWindowWidth = newRect.width; + mWindowHeight = newRect.height; + SurfaceResized(); mAdaptor->SurfaceResizePrepare(mSurface.get(), newSize); DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Updated PositionSize by server :resize signal [%d x %d]\n", this, mNativeWindowId, newRect.width, newRect.height); - Dali::Window handle(this); mResizeSignal.Emit(handle, newSize); mAdaptor->SurfaceResizeComplete(mSurface.get(), newSize); }