+ bool moved = false;
+ bool resize = false;
+
+ Dali::Window handle(this);
+
+ PositionSize oldRect = GetPositionSize();
+ PositionSize newRect = positionSize;
+
+ if((oldRect.x != newRect.x) || (oldRect.y != newRect.y))
+ {
+ moved = true;
+ }
+
+ if((oldRect.width != newRect.width) || (oldRect.height != newRect.height))
+ {
+ resize = true;
+ }
+
+ if(moved || resize)
+ {
+ DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), current angle (%d), position or size is updated by server , (%d, %d) [%d x %d]\n", this, mNativeWindowId, mRotationAngle, newRect.x, newRect.y, newRect.width, newRect.height);
+ mWindowSurface->UpdatePositionSize(positionSize);
+ }
+
+ if((oldRect.x != newRect.x) || (oldRect.y != newRect.y))
+ {
+ DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Moved signal emit (%d, %d)\n", this, mNativeWindowId, newRect.x, 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))
+ {
+ Uint16Pair newSize(newRect.width, newRect.height);
+
+ mWindowWidth = newRect.width;
+ mWindowHeight = newRect.height;
+
+ SurfaceResized(static_cast<float>(mWindowWidth), static_cast<float>(mWindowHeight));
+
+ mAdaptor->SurfaceResizePrepare(mSurface.get(), newSize);
+
+ DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Resized signal emit [%d x %d]\n", this, mNativeWindowId, newRect.width, newRect.height);
+ mResizeSignal.Emit(handle, newSize);
+ mAdaptor->SurfaceResizeComplete(mSurface.get(), newSize);
+ }
+
+ mSurface->SetFullSwapNextFrame();
+
+ Dali::Accessibility::Accessible::Get(mScene.GetRootLayer())->EmitBoundsChanged(Dali::Rect<>(positionSize.x, positionSize.y, positionSize.width, positionSize.height));