[access][ctxpopup][popup] parent could be any object such as elm_list which does
authorShinwoo Kim <kimcinoo.efl@gmail.com>
Thu, 14 Feb 2013 09:20:54 +0000 (09:20 +0000)
committerShinwoo Kim <kimcinoo.efl@gmail.com>
Thu, 14 Feb 2013 09:20:54 +0000 (09:20 +0000)
not know ctxpopup, popup as its child object in the focus_next();.

SVN revision: 83884

src/lib/elc_ctxpopup.c
src/lib/elc_popup.c
src/lib/elm_access.c
src/lib/elm_widget.h

index a6183ba..5b2a934 100644 (file)
@@ -1132,6 +1132,12 @@ elm_ctxpopup_add(Evas_Object *parent)
    EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
    Evas_Object *obj = eo_add(MY_CLASS, parent);
    eo_unref(obj);
+
+   /* access: parent could be any object such as elm_list which does
+      not know elc_ctxpopup as its child object in the focus_next(); */
+   Elm_Widget_Smart_Data *wd = eo_data_get(obj, ELM_OBJ_WIDGET_CLASS);
+   wd->highlight_root = EINA_TRUE;
+
    return obj;
 }
 
index 0770e36..56b9fdd 100644 (file)
@@ -1447,6 +1447,12 @@ elm_popup_add(Evas_Object *parent)
    EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
    Evas_Object *obj = eo_add(MY_CLASS, parent);
    eo_unref(obj);
+
+   /* access: parent could be any object such as elm_list which does
+      not know elc_popup as its child object in the focus_next();    */
+   Elm_Widget_Smart_Data *wd = eo_data_get(obj, ELM_OBJ_WIDGET_CLASS);
+   wd->highlight_root = EINA_TRUE;
+
    return obj;
 }
 
index f8a27c3..09eaae8 100644 (file)
@@ -442,6 +442,24 @@ _elm_access_highlight_object_activate(Evas_Object *obj, Elm_Activate act)
 EAPI void
 _elm_access_highlight_cycle(Evas_Object *obj, Elm_Focus_Direction dir)
 {
+   Elm_Widget_Smart_Data *wd;
+   Evas_Object *ho;
+   ho = _access_highlight_object_get(obj);
+
+   /* find highlight root */
+   do
+     {
+        wd = eo_data_get(ho, ELM_OBJ_WIDGET_CLASS);
+        if (wd->highlight_root)
+          {
+             /* change highlight root */
+             obj = ho;
+             break;
+          }
+        ho = elm_widget_parent_get(ho);
+     }
+   while (ho);
+
    _elm_access_read_mode_set(EINA_TRUE);
    elm_widget_focus_cycle(obj, dir);
    _elm_access_read_mode_set(EINA_FALSE);
index e59ee27..9a9f648 100644 (file)
@@ -430,6 +430,7 @@ typedef struct _Elm_Widget_Smart_Data
    Eina_Bool                     still_in : 1;
    Eina_Bool                     can_access : 1;
    Eina_Bool                     highlighted : 1;
+   Eina_Bool                     highlight_root : 1;
    Eina_Bool                     orientation_disabled : 1;
 } Elm_Widget_Smart_Data;