bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=17c6743180a2ac99e8f8259e41d95e05043a06e8

commit 17c6743180a2ac99e8f8259e41d95e05043a06e8
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Mon Jan 6 13:18:50 2020 -0500

    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....@samsung.com>
    Reviewed-by: Jaehyun Cho <jae_hyun....@samsung.com>
    Differential Revision: https://phab.enlightenment.org/D11027
---
 src/lib/evas/gesture/efl_canvas_gesture_manager.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c 
b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
index a2d3077404..f283985d4d 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
@@ -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)

-- 


Reply via email to