fix(obj): reset all input devices when disable obj (#3483)

* fix(obj): reset all input devices when disable obj

* remove const

* Replace lv_obj_reset_input with lv_indev_reset

Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
_VIFEXTech
2022-07-15 20:21:11 +08:00
committed by GitHub
parent 11602976e9
commit d11171d2bd
+5
View File
@@ -278,6 +278,11 @@ void lv_obj_add_state(lv_obj_t * obj, lv_state_t state)
lv_state_t new_state = obj->state | state;
if(obj->state != new_state) {
if(new_state & LV_STATE_DISABLED) {
lv_indev_reset(NULL, obj);
}
lv_obj_set_state(obj, new_state);
}
}