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
co-authored by HaoHangyu pengyiqiang
parent b339e67581
commit e33bc08e54
+7 -2
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)
{
/*Wait for release to avoid accidentally triggering other obj to be clicked*/
lv_indev_wait_release(indev);
/* 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);