forked from enlightenment/efl
0c74d1c82d
Subject: [E-devel] [patch] evas - preventing retard mouse event process in evas_object_event_callback_call I made a small patch to prevent retard mouse event process. At certain circumstance (like as genlist select callback + naviframe item push), some events are repeat processed. If some evas_objects're iterating in evas_event_feed_mouse_up and mouse_out event's emitted by other interrupt(such as naviframe item push), then some evas_objects events are multiple processed by evas_object_event_callback_call. More elaborating it with a example. There are a genlist and a multibuttonentry on genlist item. When a user clicks multibuttonentry then evas will process mouse down and up. in evas_event_feed_mouse_up, it gets evas object list to process mouse events. Then in the evas object list, there are two evas objects - rect and textblock. Two objects have its own parents. the rect has below parents. ---------------------------------------- edje - genlist item elm_genlist_pan edje multibuttonentry box entry els_scroller (0x2a601788) rect <== the rect the textblock has below parents. ---------------------------------------------- edje - genlist item elm_genlist_pan edje multibuttonentry box entry els_scroller(0x2a601788) edje elm_pan edje textblock <== the textblock (note : two evas object have same parent (els_scroller)) So normally mouse up callbacks event propagates to its own parent. the rect is processed to genlist item. and the textblock is processed to genlist item. but when els_scroller is processed, it's blocked by checking event type and event id checking. Mouse Up(rect) -> Mouse Up(textblock) event_id (3) -> event_id (3) evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id) { ... if ((obj->delete_me) || (!obj->layer)) return; if ((obj->last_event == event_id) && (obj->last_event_type == type)) return; <=== blocked However if naviframe item is pushed in the middle of mouse up processing. It can break into mouse up. So it's processed like below. Mouse Up(rect) -> Mouse Out(rect) -> Mouse Out(textblock) -> Mouse Up(textblock) event_id (3) -> event_id(4) -> event_id(4) -> event_id(3) (note Mouse_Out is made by naviframe item push for event freezing) If that, there's no mechanism to block that repeat processing same event. So I suggest this patch. This patch blocks old events if there's no reason to process. (It blocks old mouse_up event because mouse_out is processed.) And I think it also clear the bug in "[E-devel] event repetition with elm_naviframe/elm_genlist" SVN revision: 67879 |
||
---|---|---|
legacy |