efl/gesture: do not emit events for canceled gestures with no state

for non-continuing gestures which have been canceled at this point, we must
not emit events in order to avoid sending useless events which serve no
purpose other than to waste cpu cycles

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11027
This commit is contained in:
Mike Blumenkrantz 2020-01-06 13:18:50 -05:00 committed by Marcel Hollerbach
parent fa0fb44d09
commit 17c6743180
1 changed files with 2 additions and 3 deletions

View File

@ -220,10 +220,9 @@ _efl_canvas_gesture_manager_filter_event(void *data, Eo *target, void *event)
efl_gesture_state_set(gesture, EFL_GESTURE_STATE_CANCELED);
else
{
//Need to recognize events that occur consecutively
//in a mouse-down state.
if (rd->continues)
continue;
goto post_event;
}
}
else if (recog_state == EFL_GESTURE_RECOGNIZER_RESULT_IGNORE)
@ -233,7 +232,7 @@ _efl_canvas_gesture_manager_filter_event(void *data, Eo *target, void *event)
efl_gesture_timestamp_set(gesture, efl_gesture_touch_cur_timestamp_get(touch_event));
efl_event_callback_call(target, gesture_type, gesture);
post_event:
//If the current event recognizes the gesture continuously, dont delete gesture.
if (((recog_state == EFL_GESTURE_RECOGNIZER_RESULT_FINISH) || (recog_state == EFL_GESTURE_RECOGNIZER_RESULT_CANCEL)) &&
!rd->continues)