Description
I added an LV_EVENT_CLICKED to an object, but when I press it I received immediately the LV_EVENT_CLICKED event.
My LV_INDEV_TYPE_POINTER implementation looks ok as it is not generating LV_INDEV_STATE_RELEASED, so it looks the LV_EVENT_CLICKED is internally generated.
How can I fix it, to receive the LV_EVENT_CLICKED after the object is press released?
What MCU/Processor/Board and compiler are you using?
Simulated
What LVGL version are you using?
v8
What do you want to achieve?
What have you tried so far?
Code to reproduce
lv_obj_t *icon = lv_img_create( aParent );
lv_obj_add_flag( icon, LV_OBJ_FLAG_CLICKABLE );
lv_obj_add_style( icon, lv_theme_get_checkable(), LV_STATE_PRESSED );
lv_obj_add_event_cb(icon, event_clicked_cb, LV_EVENT_CLICKED, NULL);