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:
parent
b339e67581
commit
e33bc08e54
@ -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)
|
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*/
|
/*Wait for release to avoid accidentally triggering other obj to be clicked*/
|
||||||
lv_indev_wait_release(indev);
|
lv_indev_wait_release(indev);
|
||||||
|
}
|
||||||
|
|
||||||
/*Reset the input device*/
|
/*Reset the input device*/
|
||||||
lv_indev_reset(indev, obj);
|
lv_indev_reset(indev, obj);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user