Fix issue of the converted geometry for DnD. 63/320763/1
authorWonsik Jung <sidein@samsung.com>
Fri, 7 Mar 2025 06:43:09 +0000 (15:43 +0900)
committerWonsik Jung <sidein@samsung.com>
Fri, 7 Mar 2025 06:43:09 +0000 (15:43 +0900)
Fix issue of the converted geometry for DnD when screen rotation works.

Change-Id: I408c977413db6768f364f4cc4f05b46a854cfaee

dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp

index 90935a92a8e8c4bc9a7b00c150de105b4ed8b994..f99bfc85ca04fc8e7af8e851bc621760999a0987 100644 (file)
@@ -492,26 +492,25 @@ Vector2 DragAndDropEcoreWl::RecalculatePositionByOrientation(int x, int y, Dali:
 {
   int screenWidth, screenHeight;
   Internal::Adaptor::WindowSystem::GetScreenSize(screenWidth, screenHeight);
-  int angle = DevelWindow::GetPhysicalOrientation(window);
-  Dali::Window::WindowSize size = window.GetSize();
+  int angle = static_cast<int>(DevelWindow::GetCurrentOrientation(window));
 
   int           newX, newY;
   Dali::Vector2 newPosition;
 
   if(angle == 90)
   {
-    newX = (size.GetWidth() - 1) - y;
+    newX = (screenHeight - 1) - y;
     newY = x;
   }
   else if(angle == 180)
   {
-    newX = (size.GetHeight() - 1) - x;
-    newY = (size.GetWidth() - 1) - y;
+    newX = (screenWidth - 1) - x;
+    newY = (screenHeight - 1) - y;
   }
   else if(angle == 270)
   {
     newX = y;
-    newY = (size.GetHeight() - 1) - x;
+    newY = (screenWidth - 1) - x;
   }
   else
   {