Fix rotation calculation logic for multi window 41/320841/1
authorTaehyub Kim <taehyub.kim@samsung.com>
Mon, 10 Mar 2025 06:02:30 +0000 (15:02 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Mon, 10 Mar 2025 06:04:47 +0000 (15:04 +0900)
Change-Id: I7608c89416033968053b51324e2b0bfef20513bd

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

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