diff options
author | Hermet Park <hermetpark@gmail.com> | 2018-07-24 12:04:11 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2018-07-24 12:04:11 -0400 |
commit | cd3f8087252063915b9ef80aa2e78f5627ed9f80 (patch) | |
tree | 2315b3ed145eee27ecafc896e6fbd4a6c836c542 | |
parent | d0f48312c233c7aeacad261ad7c03586ef3fae3f (diff) | |
download | efl-cd3f8087252063915b9ef80aa2e78f5627ed9f80.tar.gz |
evas canvas: fix not to trigger unnecessary events.
Summary:
Here comparision is logically wrong because it compares
the coordinates(cur, prev) of the different spaces.
As you can see just above the conditions,
Cur coordinates could be transformed into the map space (if objs have)
on the otherhands, prev is not. These wrong condition could occur
embarassing event trigger.
@fix
Reviewers: #committers, zmike
Reviewed By: #committers, zmike
Subscribers: cedric, #committers, zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6674
-rw-r--r-- | src/lib/evas/canvas/evas_events.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c index 171a1df655..3a27cf5b65 100644 --- a/src/lib/evas/canvas/evas_events.c +++ b/src/lib/evas/canvas/evas_events.c @@ -738,8 +738,8 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e, ev->action = EFL_POINTER_ACTION_IN; evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MOUSE_IN, evt, event_id2, EFL_EVENT_POINTER_IN); - if ((ev->cur.x != ev->prev.x) && - (ev->cur.y != ev->prev.y)) + if ((curpt.x != ev->prev.x) && + (curpt.y != ev->prev.y)) { ev->action = EFL_POINTER_ACTION_MOVE; evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MOUSE_MOVE, evt, @@ -1666,8 +1666,8 @@ _post_up_handle(Evas_Public_Data *e, Efl_Input_Pointer *parent_ev, ev->action = EFL_POINTER_ACTION_IN; evas_object_event_callback_call(eo_obj_itr, obj_itr, EVAS_CALLBACK_MOUSE_IN, evt, event_id, EFL_EVENT_POINTER_IN); - if ((ev->cur.x != ev->prev.x) && - (ev->cur.y != ev->prev.y)) + if ((pdata->seat->x != ev->prev.x) && + (pdata->seat->y != ev->prev.y)) { ev->action = EFL_POINTER_ACTION_MOVE; evas_object_event_callback_call(eo_obj_itr, obj_itr, EVAS_CALLBACK_MOUSE_MOVE, evt, @@ -2300,8 +2300,8 @@ _canvas_event_feed_mouse_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da ev->action = EFL_POINTER_ACTION_IN; evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt, event_id, EFL_EVENT_POINTER_IN); - if ((ev->cur.x != ev->prev.x) && - (ev->cur.y != ev->prev.y)) + if ((point.x != ev->prev.x) && + (point.y != ev->prev.y)) { ev->action = EFL_POINTER_ACTION_MOVE; evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt, @@ -2443,8 +2443,8 @@ nogrep: ev->action = EFL_POINTER_ACTION_IN; evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt, event_id, EFL_EVENT_POINTER_IN); - if ((ev->cur.x != ev->prev.x) && - (ev->cur.y != ev->prev.y)) + if ((point.x != ev->prev.x) && + (point.y != ev->prev.y)) { ev->action = EFL_POINTER_ACTION_MOVE; evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt, @@ -2582,8 +2582,8 @@ _canvas_event_feed_mouse_in_internal(Evas *eo_e, Efl_Input_Pointer_Data *ev) ev->action = EFL_POINTER_ACTION_IN; evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt, event_id, EFL_EVENT_POINTER_IN); - if ((ev->cur.x != ev->prev.x) && - (ev->cur.y != ev->prev.y)) + if ((pdata->seat->x != ev->prev.x) && + (pdata->seat->y != ev->prev.y)) { ev->action = EFL_POINTER_ACTION_MOVE; evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt, |