tests/gesture: add extra event callback to verify event multiplication is fixed
authorMike Blumenkrantz <zmike@samsung.com>
Tue, 21 Jan 2020 19:53:50 +0000 (14:53 -0500)
committerJongmin Lee <jm105.lee@samsung.com>
Tue, 11 Feb 2020 21:58:35 +0000 (06:58 +0900)
Differential Revision: https://phab.enlightenment.org/D11145

src/tests/elementary/efl_ui_test_gesture.c

index b6c251a..1463283 100644 (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);