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
This commit is contained in:
Hermet Park 2018-07-24 12:04:11 -04:00 committed by Mike Blumenkrantz
parent d0f48312c2
commit cd3f808725
1 changed files with 10 additions and 10 deletions

View File

@ -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,