1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(indev): disabled object shouldn't absorb clicks but let the parent to be clicked

This commit is contained in:
Gabor Kiss-Vamosi 2020-11-21 20:54:28 +01:00
parent baa1f848b1
commit 440c79e40c
2 changed files with 2 additions and 6 deletions

View File

@ -9,6 +9,7 @@
### Bugfixes
- fix(btnmatrix) handle arabic texts in button matrices
- fix(indev) disabled object shouldn't absorb clicks but let the parent to be clicked
## v7.7.2 (Planned to 17.11.2020)
### Bugfixes

View File

@ -868,11 +868,6 @@ static void indev_proc_press(lv_indev_proc_t * proc)
indev_drag_throw(proc);
}
/*Do not use disabled objects*/
if(indev_obj_act && (lv_obj_get_state(indev_obj_act, LV_OBJ_PART_MAIN) & LV_STATE_DISABLED)) {
indev_obj_act = proc->types.pointer.act_obj;
}
/*If a new object was found reset some variables and send a pressed signal*/
if(indev_obj_act != proc->types.pointer.act_obj) {
proc->types.pointer.last_point.x = proc->types.pointer.act_point.x;
@ -1144,7 +1139,7 @@ lv_obj_t * lv_indev_search_obj(lv_obj_t * obj, lv_point_t * point)
hidden_i = lv_obj_get_parent(hidden_i);
}
/*No parent found with hidden == true*/
if(hidden_i == NULL) found_p = obj;
if(hidden_i == NULL && (lv_obj_get_state(obj, LV_OBJ_PART_MAIN) & LV_STATE_DISABLED) == false) found_p = obj;
}
}