Pass events to disabled objects


I have objects that are disabled, and they don’t receive touch events. This works as should be, but sometimes I would need some elements to receive events. For example, if something is disabled and is touched, raise a popup explaining how to enable it.

In line 872 of lv_indev I have tried disabling the line

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;

and now all the disabled objects receive the events. But I think the best would be a property where you can set if the event is passed (in case of disabled) or not, set by default to off.


(cc @kisvegabor)

Another user had the opposite request, so we would need to add a setting to toggle between the two behaviors.

I think the current method is valid for almost all cases, so it is correct. But for some cases, it should be possible to change it. Like when you change lv_obj_set_click on a label, for example.


Actually, I have just modified the code, adding a variable like click in the obj definition, and a pair of functions, and now I can modify this behaviour whenever I want

I will try to make a commit when possible, to see if it makes sense.