summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-02-20 13:20:32 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-03 10:54:31 +0100
commite1b70206331dae6dea027e578459a8779e20ba4c (patch)
tree47b79ba78f9c5b7ed888a66710e9006e44b7de51
parent3603884e51daf0cbb853b33a9a7fa6421bf2b7ff (diff)
efl/gesture: correctly filter tap events based on the processing touch point
if the recognizer is processing using a touch point other than the first finger, e.g., in the case where multiple fingers are pressed simultaneously, then the recognizer needs to also detect distance based on that finger more fixes for triggering tap events while fingers are moving Differential Revision: https://phab.enlightenment.org/D11385
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c4
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_press.c4
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c
index c7b53110e2..123dbd551e 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c
@@ -102,7 +102,7 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz
102 if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE && 102 if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
103 !_event_multi_touch_get(event)) 103 !_event_multi_touch_get(event))
104 { 104 {
105 dist = efl_gesture_touch_distance(event, 0); 105 dist = efl_gesture_touch_distance(event, efl_gesture_touch_current_data_get(event)->id);
106 length = fabs(dist.x) + fabs(dist.y); 106 length = fabs(dist.x) + fabs(dist.y);
107 107
108 if (length > pd->finger_size) 108 if (length > pd->finger_size)
@@ -141,7 +141,7 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz
141 } 141 }
142 } 142 }
143 } 143 }
144 dist = efl_gesture_touch_distance(event, 0); 144 dist = efl_gesture_touch_distance(event, efl_gesture_touch_current_data_get(event)->id);
145 length = fabs(dist.x) + fabs(dist.y); 145 length = fabs(dist.x) + fabs(dist.y);
146 146
147 if (length <= pd->finger_size) 147 if (length <= pd->finger_size)
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_press.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_press.c
index bcbe5bd592..e146c5acaf 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_press.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_press.c
@@ -85,7 +85,7 @@ _efl_canvas_gesture_recognizer_long_press_efl_canvas_gesture_recognizer_recogniz
85 85
86 case EFL_GESTURE_TOUCH_STATE_UPDATE: 86 case EFL_GESTURE_TOUCH_STATE_UPDATE:
87 { 87 {
88 dist = efl_gesture_touch_distance(event, 0); 88 dist = efl_gesture_touch_distance(event, efl_gesture_touch_current_data_get(event)->id);
89 length = fabs(dist.x) + fabs(dist.y); 89 length = fabs(dist.x) + fabs(dist.y);
90 90
91 if ((_event_multi_touch_get(event)) || (length > pd->finger_size)) 91 if ((_event_multi_touch_get(event)) || (length > pd->finger_size))
@@ -117,7 +117,7 @@ _efl_canvas_gesture_recognizer_long_press_efl_canvas_gesture_recognizer_recogniz
117 if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE && 117 if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
118 !_event_multi_touch_get(event)) 118 !_event_multi_touch_get(event))
119 { 119 {
120 dist = efl_gesture_touch_distance(event, 0); 120 dist = efl_gesture_touch_distance(event, efl_gesture_touch_current_data_get(event)->id);
121 length = fabs(dist.x) + fabs(dist.y); 121 length = fabs(dist.x) + fabs(dist.y);
122 if (length <= pd->finger_size && pd->is_timeout) 122 if (length <= pd->finger_size && pd->is_timeout)
123 { 123 {
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c
index eec8c34a22..f4c28879cb 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c
@@ -80,7 +80,7 @@ new_tap:
80 if (_event_multi_touch_get(event)) return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; 80 if (_event_multi_touch_get(event)) return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
81 if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE) 81 if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE)
82 { 82 {
83 dist = efl_gesture_touch_distance(event, 0); 83 dist = efl_gesture_touch_distance(event, efl_gesture_touch_current_data_get(event)->id);
84 length = fabs(dist.x) + fabs(dist.y); 84 length = fabs(dist.x) + fabs(dist.y);
85 if (length <= pd->finger_size) 85 if (length <= pd->finger_size)
86 { 86 {
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c
index f79aff5f71..75cb3686b4 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c
@@ -101,7 +101,7 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz
101 if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE && 101 if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
102 !_event_multi_touch_get(event)) 102 !_event_multi_touch_get(event))
103 { 103 {
104 dist = efl_gesture_touch_distance(event, 0); 104 dist = efl_gesture_touch_distance(event, efl_gesture_touch_current_data_get(event)->id);
105 length = fabs(dist.x) + fabs(dist.y); 105 length = fabs(dist.x) + fabs(dist.y);
106 106
107 if (length > pd->finger_size) 107 if (length > pd->finger_size)
@@ -140,7 +140,7 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz
140 } 140 }
141 } 141 }
142 } 142 }
143 dist = efl_gesture_touch_distance(event, 0); 143 dist = efl_gesture_touch_distance(event, efl_gesture_touch_current_data_get(event)->id);
144 length = fabs(dist.x) + fabs(dist.y); 144 length = fabs(dist.x) + fabs(dist.y);
145 145
146 if (length <= pd->finger_size) 146 if (length <= pd->finger_size)