Add Move method in WindowRenderSurface 51/290251/4
authorDaekwang Ryu <dkdk.ryu@samsung.com>
Wed, 22 Mar 2023 01:36:25 +0000 (10:36 +0900)
committerDaekwang Ryu <dkdk.ryu@samsung.com>
Mon, 27 Mar 2023 02:23:11 +0000 (11:23 +0900)
Window::SetPosition called WindowRenderSurface::MoveResize.
It caused some issues. For instance when an app calls SetSize and
SetPosition in order in OnCreate() in Application, The window size
isn't resized.

Change-Id: I200951ce4623c8acaa0b5f78b41edfd1563a6189

dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-render-surface.cpp
dali/internal/window-system/common/window-render-surface.h

index a7a5e6c..98f3dbd 100644 (file)
@@ -731,7 +731,7 @@ void Window::SetPosition(Dali::Window::WindowPosition position)
   int32_t      newX    = position.GetX();
   int32_t      newY    = position.GetY();
 
-  mWindowSurface->MoveResize(PositionSize(newX, newY, oldRect.width, oldRect.height));
+  mWindowSurface->Move(PositionSize(newX, newY, oldRect.width, oldRect.height));
 
   if((oldRect.x != newX) || (oldRect.y != newY))
   {
index bfc4462..1337ff8 100644 (file)
@@ -420,6 +420,16 @@ void WindowRenderSurface::UpdatePositionSize(Dali::PositionSize positionSize)
   }
 }
 
+void WindowRenderSurface::Move(Dali::PositionSize positionSize)
+{
+  mPositionSize.x = positionSize.x;
+  mPositionSize.y = positionSize.y;
+
+  DALI_LOG_RELEASE_INFO("Update Position by client (%d, %d)\n", positionSize.x, positionSize.y);
+
+  mWindowBase->Move(positionSize);
+}
+
 void WindowRenderSurface::MoveResize(Dali::PositionSize positionSize)
 {
   mPositionSize.x = positionSize.x;
index a6643e6..6d9ed1b 100644 (file)
@@ -140,6 +140,13 @@ public: // API
   void UpdatePositionSize(Dali::PositionSize positionSize);
 
   /**
+   * @brief Moves the window to the specified position.
+   *
+   * @param positionSize The new position of the window.
+   */
+  void Move(Dali::PositionSize positionSize);
+
+  /**
    * @brief This signal is emitted when the output is transformed.
    */
   OutputSignalType& OutputTransformedSignal();