summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-02-05 09:48:57 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-14 09:20:54 +0100
commit9e53d9c017dca2098eb4bf3f96aba57d85194b45 (patch)
treef971f568809cf09e0ccb6a58652120a1d551f049 /src/lib/evas
parentedcc16238b3885f32bdde5c7dd4864e6809880db (diff)
efl/gesture: fix touch state tracking
correctly set 'pressed' member of touch data only on press events and don't change it on move events in order to avoid having mismatched states Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11291
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_touch.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_touch.c b/src/lib/evas/gesture/efl_canvas_gesture_touch.c
index 84573a21b2..0d7e00495a 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_touch.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_touch.c
@@ -97,10 +97,13 @@ _efl_canvas_gesture_touch_point_record(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_T
97 pd->cur_touch = point; 97 pd->cur_touch = point;
98 point->action = action; 98 point->action = action;
99 99
100 if (!id && (action == EFL_POINTER_ACTION_DOWN)) 100 if (action == EFL_POINTER_ACTION_DOWN)
101 { 101 {
102 point->cur.pressed = EINA_TRUE; 102 point->cur.pressed = EINA_TRUE;
103 pd->state = EFL_GESTURE_TOUCH_STATE_BEGIN; 103 if (!id)
104 pd->state = EFL_GESTURE_TOUCH_STATE_BEGIN;
105 else
106 pd->state = EFL_GESTURE_TOUCH_STATE_UPDATE;
104 } 107 }
105 else if (action == EFL_POINTER_ACTION_UP) 108 else if (action == EFL_POINTER_ACTION_UP)
106 { 109 {
@@ -111,7 +114,6 @@ _efl_canvas_gesture_touch_point_record(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_T
111 { 114 {
112 pd->state = EFL_GESTURE_TOUCH_STATE_UPDATE; 115 pd->state = EFL_GESTURE_TOUCH_STATE_UPDATE;
113 } 116 }
114 point->cur.pressed |= action == EFL_POINTER_ACTION_DOWN || action == EFL_POINTER_ACTION_MOVE;
115 return; 117 return;
116 118
117finished_touch: 119finished_touch: