From 9f046e461de79e7af07862f6647352711bee0404 Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Thu, 14 Feb 2013 09:20:54 +0000 Subject: [PATCH] [access][ctxpopup][popup] parent could be any object such as elm_list which does not know ctxpopup, popup as its child object in the focus_next();. SVN revision: 83884 --- src/lib/elc_ctxpopup.c | 6 ++++++ src/lib/elc_popup.c | 6 ++++++ src/lib/elm_access.c | 18 ++++++++++++++++++ src/lib/elm_widget.h | 1 + 4 files changed, 31 insertions(+) diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c index a6183ba..5b2a934 100644 --- a/src/lib/elc_ctxpopup.c +++ b/src/lib/elc_ctxpopup.c @@ -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; } diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c index 0770e36..56b9fdd 100644 --- a/src/lib/elc_popup.c +++ b/src/lib/elc_popup.c @@ -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; } diff --git a/src/lib/elm_access.c b/src/lib/elm_access.c index f8a27c3..09eaae8 100644 --- a/src/lib/elm_access.c +++ b/src/lib/elm_access.c @@ -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); diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h index e59ee27..9a9f648 100644 --- a/src/lib/elm_widget.h +++ b/src/lib/elm_widget.h @@ -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; -- 2.7.4