Summary:
For various angles 90, 180, 270, the calculation of dnd window position
is not proper causing window to be placed wrongly while dragging.
Signed-Off By: Kumar Navneet <k.navneet@samsung.com>
@fix
Test Plan:
Longpress and drag and drop in entry by placing device at various angles
90, 180 and 270.
Reviewers: woohyun, cedric, thiepha
Reviewed By: thiepha
Subscribers: navnbeet
Differential Revision: https://phab.enlightenment.org/D3188
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
evas_object_show(icon);
evas_object_show(dragwin);
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x3, &y3);
- _dragx = x3 - x2;
- _dragy = y3 - y2;
rot = ecore_evas_rotation_get(ee);
switch (rot)
case 90:
xr = y3;
yr = ew - x3;
+ _dragx = y3 - y2;
+ _dragy = x3 - x2;
break;
case 180:
xr = ew - x3;
yr = eh - y3;
+ _dragx = x3 - x2;
+ _dragy = y3 - y2;
break;
case 270:
xr = eh - y3;
yr = x3;
+ _dragx = y3 - y2;
+ _dragy = x3 - x2;
break;
default:
xr = x3;
yr = y3;
+ _dragx = x3 - x2;
+ _dragy = y3 - y2;
break;
}
x = ex + xr - _dragx;