kimcinoo pushed a commit to branch master.
commit 97b0908a8e67c3b6a63befcf10281967e3ec4324
Author: Shinwoo Kim <[email protected]>
Date: Tue Sep 10 14:22:21 2013 +0900
[access] unfocusable object could have highlight
---
src/lib/elm_access.c | 10 ----------
src/lib/elm_widget.c | 35 ++++++++++++++++++++++++-----------
2 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/src/lib/elm_access.c b/src/lib/elm_access.c
index 4c8cf89..6623e34 100644
--- a/src/lib/elm_access.c
+++ b/src/lib/elm_access.c
@@ -39,7 +39,6 @@ _elm_access_smart_add(Eo *obj, void *_pd EINA_UNUSED, va_list
*list EINA_UNUSED)
eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
elm_widget_sub_object_add(eo_parent_get(obj), obj);
- elm_widget_can_focus_set(obj, _elm_config->access_mode);
}
static Eina_Bool
@@ -1414,14 +1413,6 @@ elm_access_highlight_next_set(Evas_Object *obj,
Elm_Highlight_Direction dir, Eva
}
static void
-_elm_access_smart_access(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
-{
- Eina_Bool is_access = va_arg(*list, int);
-
- elm_widget_can_focus_set(obj, is_access);
-}
-
-static void
_class_constructor(Eo_Class *klass)
{
const Eo_Op_Func_Description func_desc[] = {
@@ -1431,7 +1422,6 @@ _class_constructor(Eo_Class *klass)
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS),
_elm_access_smart_on_focus),
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACTIVATE),
_elm_access_smart_activate),
- EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACCESS),
_elm_access_smart_access),
EO_OP_FUNC_SENTINEL
};
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index cf008f8..71953ce 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -2597,6 +2597,7 @@ elm_widget_focus_next_get(const Evas_Object *obj,
static void
_elm_widget_focus_next_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
+ Elm_Access_Info *ac;
Elm_Focus_Direction dir = va_arg(*list, Elm_Focus_Direction);
Evas_Object **next = va_arg(*list, Evas_Object **);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
@@ -2608,10 +2609,19 @@ _elm_widget_focus_next_get(Eo *obj, void *_pd
EINA_UNUSED, va_list *list)
*next = NULL;
/* Ignore if disabled */
- if ((!evas_object_visible_get(obj))
- || (elm_widget_disabled_get(obj))
- || (elm_widget_tree_unfocusable_get(obj)))
- return;
+ if (_elm_config->access_mode && _elm_access_auto_highlight_get())
+ {
+ if (!evas_object_visible_get(obj)
+ || (elm_widget_tree_unfocusable_get(obj)))
+ return;
+ }
+ else
+ {
+ if ((!evas_object_visible_get(obj))
+ || (elm_widget_disabled_get(obj))
+ || (elm_widget_tree_unfocusable_get(obj)))
+ return;
+ }
/* Try use hook */
if (_elm_widget_focus_chain_manager_is(obj))
@@ -2645,16 +2655,19 @@ _elm_widget_focus_next_get(Eo *obj, void *_pd
EINA_UNUSED, va_list *list)
return;
}
- if (!elm_widget_can_focus_get(obj))
- return;
-
- /* focusable object but does not have access info */
- if (_elm_config->access_mode)
+ /* access object does not check sd->can_focus, because an object could
+ have highlight even though the object is not focusable. */
+ if (_elm_config->access_mode && _elm_access_auto_highlight_get())
{
- Elm_Access_Info *ac;
- ac= _elm_access_info_get(obj);
+ ac = _elm_access_info_get(obj);
if (!ac) return;
+
+ /* check whether the hover object is visible or not */
+ if (!evas_object_visible_get(ac->hoverobj))
+ return;
}
+ else if (!elm_widget_can_focus_get(obj))
+ return;
if (elm_widget_focus_get(obj))
{
--
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk