summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-07-24 12:04:11 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-07-24 12:04:11 -0400
commitcd3f8087252063915b9ef80aa2e78f5627ed9f80 (patch)
tree2315b3ed145eee27ecafc896e6fbd4a6c836c542
parentd0f48312c233c7aeacad261ad7c03586ef3fae3f (diff)
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.c20
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,
738 ev->action = EFL_POINTER_ACTION_IN; 738 ev->action = EFL_POINTER_ACTION_IN;
739 evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MOUSE_IN, evt, 739 evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MOUSE_IN, evt,
740 event_id2, EFL_EVENT_POINTER_IN); 740 event_id2, EFL_EVENT_POINTER_IN);
741 if ((ev->cur.x != ev->prev.x) && 741 if ((curpt.x != ev->prev.x) &&
742 (ev->cur.y != ev->prev.y)) 742 (curpt.y != ev->prev.y))
743 { 743 {
744 ev->action = EFL_POINTER_ACTION_MOVE; 744 ev->action = EFL_POINTER_ACTION_MOVE;
745 evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MOUSE_MOVE, evt, 745 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,
1666 ev->action = EFL_POINTER_ACTION_IN; 1666 ev->action = EFL_POINTER_ACTION_IN;
1667 evas_object_event_callback_call(eo_obj_itr, obj_itr, EVAS_CALLBACK_MOUSE_IN, evt, 1667 evas_object_event_callback_call(eo_obj_itr, obj_itr, EVAS_CALLBACK_MOUSE_IN, evt,
1668 event_id, EFL_EVENT_POINTER_IN); 1668 event_id, EFL_EVENT_POINTER_IN);
1669 if ((ev->cur.x != ev->prev.x) && 1669 if ((pdata->seat->x != ev->prev.x) &&
1670 (ev->cur.y != ev->prev.y)) 1670 (pdata->seat->y != ev->prev.y))
1671 { 1671 {
1672 ev->action = EFL_POINTER_ACTION_MOVE; 1672 ev->action = EFL_POINTER_ACTION_MOVE;
1673 evas_object_event_callback_call(eo_obj_itr, obj_itr, EVAS_CALLBACK_MOUSE_MOVE, evt, 1673 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
2300 ev->action = EFL_POINTER_ACTION_IN; 2300 ev->action = EFL_POINTER_ACTION_IN;
2301 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt, 2301 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt,
2302 event_id, EFL_EVENT_POINTER_IN); 2302 event_id, EFL_EVENT_POINTER_IN);
2303 if ((ev->cur.x != ev->prev.x) && 2303 if ((point.x != ev->prev.x) &&
2304 (ev->cur.y != ev->prev.y)) 2304 (point.y != ev->prev.y))
2305 { 2305 {
2306 ev->action = EFL_POINTER_ACTION_MOVE; 2306 ev->action = EFL_POINTER_ACTION_MOVE;
2307 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt, 2307 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt,
@@ -2443,8 +2443,8 @@ nogrep:
2443 ev->action = EFL_POINTER_ACTION_IN; 2443 ev->action = EFL_POINTER_ACTION_IN;
2444 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt, 2444 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt,
2445 event_id, EFL_EVENT_POINTER_IN); 2445 event_id, EFL_EVENT_POINTER_IN);
2446 if ((ev->cur.x != ev->prev.x) && 2446 if ((point.x != ev->prev.x) &&
2447 (ev->cur.y != ev->prev.y)) 2447 (point.y != ev->prev.y))
2448 { 2448 {
2449 ev->action = EFL_POINTER_ACTION_MOVE; 2449 ev->action = EFL_POINTER_ACTION_MOVE;
2450 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt, 2450 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)
2582 ev->action = EFL_POINTER_ACTION_IN; 2582 ev->action = EFL_POINTER_ACTION_IN;
2583 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt, 2583 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt,
2584 event_id, EFL_EVENT_POINTER_IN); 2584 event_id, EFL_EVENT_POINTER_IN);
2585 if ((ev->cur.x != ev->prev.x) && 2585 if ((pdata->seat->x != ev->prev.x) &&
2586 (ev->cur.y != ev->prev.y)) 2586 (pdata->seat->y != ev->prev.y))
2587 { 2587 {
2588 ev->action = EFL_POINTER_ACTION_MOVE; 2588 ev->action = EFL_POINTER_ACTION_MOVE;
2589 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt, 2589 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt,