refactor(event): use lv_event_get_orignal_target instead of current_target

This commit is contained in:
Gabor Kiss-Vamosi
2023-03-06 12:47:18 +01:00
parent 1d6ea3af51
commit 680d6d1a7d
41 changed files with 65 additions and 65 deletions

View File

@@ -4,10 +4,10 @@
static void event_cb(lv_event_t * e)
{
/*The original target of the event. Can be the buttons or the container*/
lv_obj_t * target = lv_event_get_target(e);
lv_obj_t * target = lv_event_get_original_target(e);
/*The current target is always the container as the event is added to it*/
lv_obj_t * cont = lv_event_get_current_target(e);
lv_obj_t * cont = lv_event_get_target(e);
/*If container was clicked do nothing*/
if(target == cont) return;