fix(btnmatrix) improve focusing if used in groups

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-03 11:14:25 +02:00
parent 3c39c39c9d
commit e1e45b1de3
5 changed files with 50 additions and 16 deletions

View File

@@ -662,7 +662,9 @@ static void lv_obj_event(const lv_obj_class_t * class_p, lv_event_t * e)
bool editing = false;
editing = lv_group_get_editing(lv_obj_get_group(obj));
lv_state_t state = LV_STATE_FOCUSED;
lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
lv_indev_t * indev = lv_event_get_param(e);
lv_indev_type_t indev_type = lv_indev_get_type(indev);
if(indev_type == LV_INDEV_TYPE_KEYPAD || indev_type == LV_INDEV_TYPE_ENCODER) state |= LV_STATE_FOCUS_KEY;
if(editing) {
state |= LV_STATE_EDITED;