btnm, tabview: in LV_SIGNAL_FOCUS assume the last indev if not focused by the an indev

This commit is contained in:
Gabor Kiss-Vamosi
2019-10-19 11:01:10 +02:00
parent 4c944f4050
commit 9a7b7f8511
2 changed files with 11 additions and 2 deletions

View File

@@ -750,9 +750,12 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p
}
if(sign == LV_SIGNAL_FOCUS) {
lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
/*If not focused by an input device assume the last input device*/
if(indev_type == LV_INDEV_TYPE_NONE) {
indev_type = lv_indev_get_type(lv_indev_get_next(NULL));
}
/*With ENCODER select the first button only in edit mode*/
if(indev_type == LV_INDEV_TYPE_ENCODER) {
#if LV_USE_GROUP