summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwoochan lee <wc0917.lee@samsung.com>2015-10-08 12:35:07 +0200
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2015-11-12 10:15:03 +0100
commit9984b341ffd6bf0eac8fcd91d3804ba67f65e5f2 (patch)
tree0f7ced2cfe2339a7162a3b202dbee4f1750c1c2d
parent1f5b9e3d3c82387185db523c1fcef58a1b6c02ab (diff)
downloadelementary-9984b341ffd6bf0eac8fcd91d3804ba67f65e5f2.tar.gz
gesture_layer: fix long tap gesture has wrong timestamp.
Summary: The timestamp has 0 value when n_long_tap_start callback called. Then timestamp is same on each n_long_tap_move callback functions. For fix this bug, update timestamp before called state_set function. Also update timestamp in every timeout. Test Plan: Run test_gesture_layer2.c Print timestamp in every n_long_tap_XXX callback. Reviewers: tasn, cedric Differential Revision: https://phab.enlightenment.org/D3144 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/elm_gesture_layer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/elm_gesture_layer.c b/src/lib/elm_gesture_layer.c
index 48f528553..7a37ae36d 100644
--- a/src/lib/elm_gesture_layer.c
+++ b/src/lib/elm_gesture_layer.c
@@ -1781,6 +1781,9 @@ static Eina_Bool
_long_tap_timeout(void *data)
{
Gesture_Info *gesture = data;
+ Long_Tap_Type *st = gesture->data;
+
+ st->info.timestamp = ecore_time_get() * 1000;
_state_set(gesture, ELM_GESTURE_STATE_MOVE,
gesture->data, EINA_TRUE);
@@ -2109,13 +2112,13 @@ _n_long_tap_test(Evas_Object *obj,
_compute_taps_center(st, &st->info.x, &st->info.y, pe);
st->center_x = st->info.x; /* Update coords for */
st->center_y = st->info.y; /* reporting START */
+ st->info.timestamp = pe->timestamp;
/* This is the first mouse down we got */
if (eina_list_count(st->touched) == 1)
{
_state_set(gesture, ELM_GESTURE_STATE_START,
gesture->data, EINA_FALSE);
- st->info.timestamp = pe->timestamp;
/* To test long tap */
/* When this timer expires, gesture STARTED */
@@ -2135,6 +2138,7 @@ _n_long_tap_test(Evas_Object *obj,
case EVAS_CALLBACK_MOUSE_UP:
st->touched = _touched_device_remove(st->touched, pe);
_compute_taps_center(st, &st->center_x, &st->center_y, pe);
+ st->info.timestamp = pe->timestamp;
if (st->info.n)
{
if (gesture->state == ELM_GESTURE_STATE_MOVE)
@@ -2161,6 +2165,7 @@ _n_long_tap_test(Evas_Object *obj,
Evas_Coord y = 0;
_compute_taps_center(st, &x, &y, pe);
+ st->info.timestamp = pe->timestamp;
/* ABORT if user moved fingers out of tap area */
if (!_inside(x, y, st->center_x, st->center_y,
sd->tap_finger_size))