On Fri, Apr 6, 2012 at 3:19 AM, Enlightenment SVN <
no-re...@enlightenment.org> wrote:

> Log:
> elementary/win - [E-devel] [Patch][Elementary] Patch for elm_win to fix
> the focus chain issue in case of a widget added as a normal sub-object, not
> a resizable object
>
>  Current Issue:
>  Currently when we add a widget to window as a sub-object, e.g.
>  elm_notify_add(win) which internally calls elm_widget_sub_object_add
>  then the focus chain using <TAB> includes only
>  the first focusable subitem of the widget, not all.
>  Whereas with elm_win_resize_object_add, it works fine and cycles to
>  all focusable sub-items of the widget.
>
>  Reason:
>  The reason is that we are appending sub-object to the list in
>  elm_win which is used for focus chain, only in case of
>  elm_win_resize_object_add.
>
>  Change Description:
>  Added a new API: EAPI Eina_List
>  *elm_widget_sub_object_list_get(const Evas_Object *obj);
>  This API returns the list of sub-objects of an elementary widget
>  (sd->subobjs) where sd is Smart_Data pointer obtainted using
>  elm_widget_smart_data_get(obj).
>  We have used this API in elm_win for focus_next_hook implementation.
>
>  Signed-Off-By: RAJEEV RANJAN<rajeev.r>@samsumg.com>
>
>
>
This is a (wrong) work around for a bigger problem on sub object handling
at elm-widget.c. I have fixed much more than that on
http://git.profusion.mobi/cgit.cgi/glima/elementary/commit/?id=0211957db417d5ddb2a66530fa6cc2bc60a8360e,
please take a look. I'd push that upstream if you wanted, but I can't keep
testing it with a raw Elementary, i.e. without my changes.

For now, my commit list will just pass over this change and use the right
way on sub objects.


>
> Author:       hermet
> Date:         2012-04-05 23:19:16 -0700 (Thu, 05 Apr 2012)
> New Revision: 69943
> Trac:         http://trac.enlightenment.org/e/changeset/69943
>
> Modified:
>  trunk/elementary/src/lib/elm_widget.c
> trunk/elementary/src/lib/elm_widget.h trunk/elementary/src/lib/elm_win.c
>
> Modified: trunk/elementary/src/lib/elm_widget.c
> ===================================================================
> --- trunk/elementary/src/lib/elm_widget.c       2012-04-06 05:58:50 UTC
> (rev 69942)
> +++ trunk/elementary/src/lib/elm_widget.c       2012-04-06 06:19:16 UTC
> (rev 69943)
> @@ -1036,6 +1036,13 @@
>    evas_object_smart_callback_call(obj, "sub-object-del", sobj);
>  }
>
> +EAPI const Eina_List *
> +elm_widget_sub_object_list_get(const Evas_Object *obj)
> +{
> +   API_ENTRY return NULL;
> +   return (const Eina_List *)sd->subobjs;
> +}
> +
>  EAPI void
>  elm_widget_resize_object_set(Evas_Object *obj,
>                              Evas_Object *sobj)
>
> Modified: trunk/elementary/src/lib/elm_widget.h
> ===================================================================
> --- trunk/elementary/src/lib/elm_widget.h       2012-04-06 05:58:50 UTC
> (rev 69942)
> +++ trunk/elementary/src/lib/elm_widget.h       2012-04-06 06:19:16 UTC
> (rev 69943)
> @@ -328,6 +328,7 @@
>  EAPI void            *elm_widget_data_get(const Evas_Object *obj);
>  EAPI void             elm_widget_sub_object_add(Evas_Object *obj,
> Evas_Object *sobj);
>  EAPI void             elm_widget_sub_object_del(Evas_Object *obj,
> Evas_Object *sobj);
> +EAPI const Eina_List *elm_widget_sub_object_list_get(const Evas_Object
> *obj);
>  EAPI void             elm_widget_resize_object_set(Evas_Object *obj,
> Evas_Object *sobj);
>  EAPI void             elm_widget_hover_object_set(Evas_Object *obj,
> Evas_Object *sobj);
>  EAPI void             elm_widget_signal_emit(Evas_Object *obj, const char
> *emission, const char *source);
>
> Modified: trunk/elementary/src/lib/elm_win.c
> ===================================================================
> --- trunk/elementary/src/lib/elm_win.c  2012-04-06 05:58:50 UTC (rev 69942)
> +++ trunk/elementary/src/lib/elm_win.c  2012-04-06 06:19:16 UTC (rev 69943)
> @@ -498,19 +498,20 @@
>  {
>    Elm_Win *wd = elm_widget_data_get(obj);
>    const Eina_List *items;
> +   const Eina_List *list;
>    void *(*list_data_get) (const Eina_List *list);
>
>    if (!wd)
>      return EINA_FALSE;
> +   list = elm_widget_sub_object_list_get(obj);
>
>    /* Focus chain */
> -   if (wd->subobjs)
> +   if (list)
>      {
>         if (!(items = elm_widget_focus_custom_chain_get(obj)))
>           {
> -             items = wd->subobjs;
> -             if (!items)
> -               return EINA_FALSE;
> +             if (!list) return EINA_FALSE;
> +             items = list;
>           }
>         list_data_get = eina_list_data_get;
>
>
>
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>



-- 
Gustavo Lima Chaves
Senior Developer

ProFUSION embedded systems

http://profusion.mobi
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to