backport needed? Daniel Juyung Seo (SeoZ)
On Tue, Jul 5, 2011 at 10:33 AM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > From: Hyoyoung Chang <hyoyoung.ch...@samsung.com> > Subject: [E-devel] [patch] evas - add checking event type > > Dear developers. > > I found a bug about evas event handling. > In some situation, evas blocks some events by checking _evas_event_counter. > So I made a patch that is checking event type also event counter. > > Reproduce steps: > 1. make a window > 2. show window before adding a elementary/genlist widget > > --- codes --- > void _gl_mousedown_cb(void *data, Evas *evas, Evas_Object *obj, void > *event_info) > { > printf("_gl_mousedown_cb !! \n"); > } > > static Eina_Bool create_main_win(App *app) > { > app->win = elm_win_add(NULL, "genlist-win", ELM_WIN_BASIC); > evas_object_show(app->win); <-- position 1 > > Evas_Object *genlist = elm_genlist_add(app->win); > elm_win_resize_object_add(app->win, genlist); > evas_object_event_callback_add(genlist, EVAS_CALLBACK_MOUSE_DOWN, > _gl_mousedown_cb, NULL); > evas_object_show(genlist); > > evas_object_resize(app->win, 320, 240); > //evas_object_show(app->win); <-- position 2 > > return EINA_TRUE; > } > --- codes --- > > In common use case, apps don't show main window at position 1. > However to reproduce, it can be at position 1. Then, focus is at just on > main window. > In that situation, if a user clicks a genlist, its event is dropped by evas. > Because in mouse down callback, it give focus to genlist. > > Then two events is made. First is mouse down, second is focus handling. > In event callback, evas processes mouse down after focus handling. > But evas found that mouse event is retarded event than focus handling. > So it ignores it. > > This patch is introduce event handling type checking to > evas_object_event_callback_call. > > > > > Author: raster > Date: 2011-07-04 18:33:59 -0700 (Mon, 04 Jul 2011) > New Revision: 61026 > Trac: http://trac.enlightenment.org/e/changeset/61026 > > Modified: > trunk/evas/ChangeLog trunk/evas/src/lib/canvas/evas_callbacks.c > trunk/evas/src/lib/include/evas_private.h > > Modified: trunk/evas/ChangeLog > =================================================================== > --- trunk/evas/ChangeLog 2011-07-05 00:06:27 UTC (rev 61025) > +++ trunk/evas/ChangeLog 2011-07-05 01:33:59 UTC (rev 61026) > @@ -413,3 +413,8 @@ > > * Polygon: Implemented "is_inside". > > +2011-07-05 Hyoyoung Chang > + > + * Fix bug where event causes event in callback on same object, but > + with same event counter, so also filter out same event types. > + > > Modified: trunk/evas/src/lib/canvas/evas_callbacks.c > =================================================================== > --- trunk/evas/src/lib/canvas/evas_callbacks.c 2011-07-05 00:06:27 UTC (rev > 61025) > +++ trunk/evas/src/lib/canvas/evas_callbacks.c 2011-07-05 01:33:59 UTC (rev > 61026) > @@ -170,8 +170,10 @@ > Evas *e; > > if ((obj->delete_me) || (!obj->layer)) return; > - if (obj->last_event == _evas_event_counter) return; > + if ((obj->last_event == _evas_event_counter) && > + (obj->last_event_type == type)) return; > obj->last_event = _evas_event_counter; > + obj->last_event_type = type; > if (!(e = obj->layer->evas)) return; > > _evas_walk(e); > > Modified: trunk/evas/src/lib/include/evas_private.h > =================================================================== > --- trunk/evas/src/lib/include/evas_private.h 2011-07-05 00:06:27 UTC (rev > 61025) > +++ trunk/evas/src/lib/include/evas_private.h 2011-07-05 01:33:59 UTC (rev > 61026) > @@ -499,6 +499,7 @@ > int mouse_grabbed; > > int last_event; > + Evas_Callback_Type last_event_type; > > struct { > int in_move, in_resize; > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel