This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efl.

View the commit online.

commit c3d1f19ed838657373b56e17657915c1c14ceb4a
Author: Marcel Hollerbach <m...@marcel-hollerbach.de>
AuthorDate: Tue May 31 21:16:24 2022 +0200

    ecore_evas_x: correctly use offset of the drag window
---
 src/modules/ecore_evas/engines/x/ecore_evas_x.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index ee612991fd..0182b45a40 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -4451,11 +4451,22 @@ static void
 _x11_drag_move(void *data, Ecore_X_Xdnd_Position *pos)
 {
    Ecore_Evas *ee = data;
-   Eina_Rect rect;
+   Eina_Size2D offset;
 
+   Eina_Rect rect;
    ecore_evas_geometry_get(ee->drag.rep, &rect.x, &rect.y, &rect.w, &rect.h);
 
-   ecore_evas_move(ee->drag.rep, pos->position.x - rect.w / 2, pos->position.y - rect.h/2);
+   if (ee->drag.offset.w == INT_MAX)
+     offset.w = rect.size.w / -2;
+   else
+     offset.w = ee->drag.offset.w;
+
+   if (ee->drag.offset.h == INT_MAX)
+     offset.h = rect.size.h / -2;
+   else
+     offset.h = ee->drag.offset.h;
+
+   ecore_evas_move(ee->drag.rep, pos->position.x + offset.w, pos->position.y + offset.h);
 }
 
 static Eina_Bool

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to