e_pointer: change a cursor rotations's center pointer 01/220901/2
authorjeon <jhyuni.kang@samsung.com>
Tue, 24 Dec 2019 09:48:26 +0000 (18:48 +0900)
committerJeongHyun Kang <jhyuni.kang@samsung.com>
Thu, 26 Dec 2019 06:42:16 +0000 (06:42 +0000)
  - in rotation cases, cursor will be rotated using evas_map
  - but moving cursor after apply evas_map, reference point will be changed.
  - so cursor will be located invalid position in rotation cases.

Change-Id: Idc5adb9b5dea711982bc1af9a06aab1026bcf38e

src/bin/e_pointer.c

index 1036f4ab83ffd458cdd31c8ecb8f94e04cc91d01..40dd695c19afa958b0b66c223edc511bbde70825 100644 (file)
@@ -30,14 +30,14 @@ _e_pointer_position_update(E_Pointer *ptr)
         break;
       case 90:
         nx = ptr->x - ptr->hot.y;
-        ny = ptr->y + ptr->hot.x - cursor_w;
+        ny = ptr->y + ptr->hot.x;
         break;
       case 180:
-        nx = ptr->x + ptr->hot.x - cursor_w;
-        ny = ptr->y + ptr->hot.y - cursor_h;
+        nx = ptr->x + ptr->hot.x;
+        ny = ptr->y + ptr->hot.y;
         break;
       case 270:
-        nx = ptr->x + ptr->hot.y - cursor_h;
+        nx = ptr->x + ptr->hot.y;
         ny = ptr->y - ptr->hot.x;
         break;
       default:
@@ -85,7 +85,7 @@ _e_pointer_object_rotation(E_Pointer *ptr)
      rotation = 270;
    else if (rotation == 270)
      rotation = 90;
-   evas_map_util_rotate(map, rotation, x + (w/2), y + (h/2));
+   evas_map_util_rotate(map, rotation, x, y);
    evas_map_util_object_move_sync_set(map, EINA_TRUE);
 
    evas_object_map_set(ec->frame, map);