tests/gesture: add extra event callback to verify event multiplication is fixed

Differential Revision: https://phab.enlightenment.org/D11145
This commit is contained in:
Mike Blumenkrantz 2020-01-21 14:53:50 -05:00 committed by Marcel Hollerbach
parent e41434d96d
commit 0694a54dbd
1 changed files with 9 additions and 0 deletions

View File

@ -60,6 +60,13 @@ gesture_cb(void *data , const Efl_Event *ev)
count[efl_gesture_state_get(g) - 1]++;
}
static void
test_cb(void *data EINA_UNUSED , const Efl_Event *ev EINA_UNUSED)
{
}
static Eo *
setup(void)
{
@ -73,6 +80,8 @@ setup(void)
rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win);
efl_content_set(win, rect);
/* add extra random cb to verify that we aren't getting double events */
efl_event_callback_add(rect, EFL_EVENT_GESTURE_MOMENTUM, test_cb, NULL);
#define WATCH(type) \
efl_event_callback_add(rect, EFL_EVENT_GESTURE_##type, gesture_cb, &count[(type)])
WATCH(TAP);