evas_events: fix comparsion for evas_events. 66/299566/2
authorHosang Kim <hosang12.kim@samsung.com>
Thu, 5 Oct 2023 05:14:12 +0000 (14:14 +0900)
committerHosang Kim <hosang12.kim@samsung.com>
Thu, 5 Oct 2023 07:17:43 +0000 (16:17 +0900)
Here comparision is logically wrong because it compares
the coordinates(cur, prev) of the different spaces.

@fix

Change-Id: I9368588ba40b8a8cc5875e88a3eab66bebbefff1

src/lib/evas/canvas/evas_events.c

index 85d3658..6688d58 100644 (file)
@@ -3074,8 +3074,8 @@ _canvas_event_feed_mouse_in_internal(Evas *eo_e, Efl_Input_Pointer_Data *ev)
              efl_ref(eo_obj);
              evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt,
                                              event_id, EFL_EVENT_POINTER_IN);
-             if (!EINA_DBL_EQ(pdata->seat->x, ev->prev.x) &&
-                 !EINA_DBL_EQ(pdata->seat->y, ev->prev.y))
+             if (!EINA_DBL_EQ(ev->cur.x, ev->prev.x) ||
+                 !EINA_DBL_EQ(ev->cur.y, ev->prev.y))
                {
                   ev->action = EFL_POINTER_ACTION_MOVE;
                   evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt,
@@ -3092,6 +3092,9 @@ _canvas_event_feed_mouse_in_internal(Evas *eo_e, Efl_Input_Pointer_Data *ev)
    /* and set up the new one */
    pdata->seat->object.in = ins;
    _evas_post_event_callback_call(eo_e, e, event_id);
+
+   ev->cur.x = pdata->seat->x;
+   ev->cur.y = pdata->seat->y;
    _canvas_event_feed_mouse_move_internal(e, ev);
    _evas_unwalk(e);