mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-27 20:57:01 +08:00
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:
@@ -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;
|
lv_state_t new_state = obj->state | state;
|
||||||
if(obj->state != new_state) {
|
if(obj->state != new_state) {
|
||||||
|
|
||||||
|
if(new_state & LV_STATE_DISABLED) {
|
||||||
|
lv_indev_reset(NULL, obj);
|
||||||
|
}
|
||||||
|
|
||||||
lv_obj_set_state(obj, new_state);
|
lv_obj_set_state(obj, new_state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user