Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_embed.c ewl_widget.h Log Message: - store a flag to specify if this widget is in the tab order already. if it isn't, we can skip checking the list. gives a really good speed boost in some test cases =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_embed.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -3 -r1.73 -r1.74 --- ewl_embed.c 11 Jul 2006 01:06:39 -0000 1.73 +++ ewl_embed.c 15 Aug 2006 14:30:38 -0000 1.74 @@ -1106,7 +1106,7 @@ current_idx = ecore_dlist_index(e->tab_order); /* make sure this widget isn't already in the list */ - if (ecore_dlist_goto(e->tab_order, w)) { + if (w->in_tab_order && ecore_dlist_goto(e->tab_order, w)) { int del_idx; /* if this widget was before or at our current focused @@ -1125,6 +1125,8 @@ if (current_idx <= (int)idx) current_idx ++; ecore_dlist_goto_index(e->tab_order, current_idx); + w->in_tab_order = 1; + DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -1217,6 +1219,8 @@ if (ecore_dlist_goto(e->tab_order, w)) ecore_dlist_remove(e->tab_order); + + w->in_tab_order = 0; DLEAVE_FUNCTION(DLEVEL_STABLE); } =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_widget.h,v retrieving revision 1.44 retrieving revision 1.45 diff -u -3 -r1.44 -r1.45 --- ewl_widget.h 13 Jul 2006 00:20:29 -0000 1.44 +++ ewl_widget.h 15 Aug 2006 14:30:38 -0000 1.45 @@ -143,6 +143,8 @@ int layer; /**< the layer relative to the parent */ int toplayered; /**< Indicates if the widget should be on the top of the layer stack */ + unsigned char in_tab_order:1; /**< Has the widget been inserted + into the tab order */ Ecore_Hash *theme; /**< Overriding theme settings */ Ewl_Pair_List theme_text; /**< Overriding text in theme */ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs