1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix(obj_tree): fix event loss caused by obj deletion (#5950)

Signed-off-by: HaoHangyu <haohangyu@xiaomi.com>
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: HaoHangyu <haohangyu@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
VIFEX 2024-03-26 10:59:32 +08:00 committed by GitHub
parent b339e67581
commit e33bc08e54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -484,8 +484,13 @@ static void lv_obj_delete_async_cb(void * obj)
static void obj_indev_reset(lv_indev_t * indev, lv_obj_t * obj)
{
/* If the input device is already in the release state,
* there is no need to wait for the input device to be released
*/
if(lv_indev_get_state(indev) != LV_INDEV_STATE_RELEASED) {
/*Wait for release to avoid accidentally triggering other obj to be clicked*/
lv_indev_wait_release(indev);
}
/*Reset the input device*/
lv_indev_reset(indev, obj);