mirror of
https://github.com/lvgl/lvgl.git
synced 2024-12-14 03:53:50 +08:00
feat(indev) allow input events to be passed to disabled objects (#2033)
This commit is contained in:
parent
eaacde6722
commit
dacca6eeb8
@ -2,6 +2,10 @@
|
||||
|
||||
## v7.9.1 (Planned at 19.01.2020)
|
||||
|
||||
### New features
|
||||
|
||||
- feat(indev) allow input events to be passed to disabled objects
|
||||
|
||||
### Bugfixes
|
||||
- fix(cpicker) fix division by zero
|
||||
- fix(dropdown) fix selecting options after the last one
|
||||
|
@ -1148,7 +1148,12 @@ 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 && (lv_obj_get_state(obj, LV_OBJ_PART_MAIN) & LV_STATE_DISABLED) == false) found_p = obj;
|
||||
if(lv_obj_is_protected(indev_obj_act, LV_PROTECT_EVENT_TO_DISABLED) == false){
|
||||
if(hidden_i == NULL && (lv_obj_get_state(obj, LV_OBJ_PART_MAIN) & LV_STATE_DISABLED) == false) found_p = obj;
|
||||
}
|
||||
else {
|
||||
if(hidden_i == NULL) found_p = obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,6 +177,7 @@ enum {
|
||||
LV_PROTECT_PRESS_LOST = 0x10, /**< If the `indev` was pressing this object but swiped out while
|
||||
pressing do not search other object.*/
|
||||
LV_PROTECT_CLICK_FOCUS = 0x20, /**< Prevent focusing the object by clicking on it*/
|
||||
LV_PROTECT_EVENT_TO_DISABLED = 0x40, /**< Pass events even to disabled objects*/
|
||||
};
|
||||
typedef uint8_t lv_protect_t;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user