e_pointer: fix cursor position when it is rotated and moved 88/293888/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 7 Jun 2023 07:41:40 +0000 (16:41 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 7 Jun 2023 10:36:59 +0000 (19:36 +0900)
cursor should be rotated before moved because position of
cursor is adjusted by evas map rotation.

Change-Id: Ic6f8c58e8eb8fd6d39d29eb0e8ec2615c1ed4713

src/bin/e_pointer.c

index a3ced92..156eaf0 100644 (file)
@@ -400,11 +400,11 @@ e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y)
              _e_pointer_hook_call(E_POINTER_HOOK_SHOW, ptr);
           }
 
-        /* move the pointer to the current position */
-        _e_pointer_position_update(ptr);
-
         /* apply the cursor obj map */
         _e_pointer_map_apply(ptr);
+
+        /* move the pointer to the current position */
+        _e_pointer_position_update(ptr);
      }
 
    if (need_call_hide)
@@ -479,8 +479,8 @@ e_pointer_rotation_set(E_Pointer *ptr, int rotation)
 
    ptr->rotation = rotation;
 
-   _e_pointer_position_update(ptr);
    _e_pointer_map_apply(ptr);
+   _e_pointer_position_update(ptr);
 
    EINA_LIST_FOREACH(e_input_devices_get(), l, dev)
      e_input_device_pointer_rotation_set(dev, rotation);
@@ -515,8 +515,8 @@ e_pointer_hwc_set(E_Pointer *ptr, Eina_Bool set)
     }
    else
     {
-       _e_pointer_position_update(ptr);
        _e_pointer_map_apply(ptr);
+       _e_pointer_position_update(ptr);
     }
 
    return EINA_TRUE;