summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/elm_access.c10
-rw-r--r--src/lib/elm_widget.c35
2 files changed, 24 insertions, 21 deletions
diff --git a/src/lib/elm_access.c b/src/lib/elm_access.c
index 4c8cf89e5..6623e346e 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)
39 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 39 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
40 40
41 elm_widget_sub_object_add(eo_parent_get(obj), obj); 41 elm_widget_sub_object_add(eo_parent_get(obj), obj);
42 elm_widget_can_focus_set(obj, _elm_config->access_mode);
43} 42}
44 43
45static Eina_Bool 44static Eina_Bool
@@ -1414,14 +1413,6 @@ elm_access_highlight_next_set(Evas_Object *obj, Elm_Highlight_Direction dir, Eva
1414} 1413}
1415 1414
1416static void 1415static void
1417_elm_access_smart_access(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
1418{
1419 Eina_Bool is_access = va_arg(*list, int);
1420
1421 elm_widget_can_focus_set(obj, is_access);
1422}
1423
1424static void
1425_class_constructor(Eo_Class *klass) 1416_class_constructor(Eo_Class *klass)
1426{ 1417{
1427 const Eo_Op_Func_Description func_desc[] = { 1418 const Eo_Op_Func_Description func_desc[] = {
@@ -1431,7 +1422,6 @@ _class_constructor(Eo_Class *klass)
1431 1422
1432 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_access_smart_on_focus), 1423 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_access_smart_on_focus),
1433 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACTIVATE), _elm_access_smart_activate), 1424 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACTIVATE), _elm_access_smart_activate),
1434 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACCESS), _elm_access_smart_access),
1435 1425
1436 EO_OP_FUNC_SENTINEL 1426 EO_OP_FUNC_SENTINEL
1437 }; 1427 };
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index cf008f855..71953ce02 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,
2597static void 2597static void
2598_elm_widget_focus_next_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list) 2598_elm_widget_focus_next_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
2599{ 2599{
2600 Elm_Access_Info *ac;
2600 Elm_Focus_Direction dir = va_arg(*list, Elm_Focus_Direction); 2601 Elm_Focus_Direction dir = va_arg(*list, Elm_Focus_Direction);
2601 Evas_Object **next = va_arg(*list, Evas_Object **); 2602 Evas_Object **next = va_arg(*list, Evas_Object **);
2602 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 2603 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)
2608 *next = NULL; 2609 *next = NULL;
2609 2610
2610 /* Ignore if disabled */ 2611 /* Ignore if disabled */
2611 if ((!evas_object_visible_get(obj)) 2612 if (_elm_config->access_mode && _elm_access_auto_highlight_get())
2612 || (elm_widget_disabled_get(obj)) 2613 {
2613 || (elm_widget_tree_unfocusable_get(obj))) 2614 if (!evas_object_visible_get(obj)
2614 return; 2615 || (elm_widget_tree_unfocusable_get(obj)))
2616 return;
2617 }
2618 else
2619 {
2620 if ((!evas_object_visible_get(obj))
2621 || (elm_widget_disabled_get(obj))
2622 || (elm_widget_tree_unfocusable_get(obj)))
2623 return;
2624 }
2615 2625
2616 /* Try use hook */ 2626 /* Try use hook */
2617 if (_elm_widget_focus_chain_manager_is(obj)) 2627 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)
2645 return; 2655 return;
2646 } 2656 }
2647 2657
2648 if (!elm_widget_can_focus_get(obj)) 2658 /* access object does not check sd->can_focus, because an object could
2649 return; 2659 have highlight even though the object is not focusable. */
2650 2660 if (_elm_config->access_mode && _elm_access_auto_highlight_get())
2651 /* focusable object but does not have access info */
2652 if (_elm_config->access_mode)
2653 { 2661 {
2654 Elm_Access_Info *ac; 2662 ac = _elm_access_info_get(obj);
2655 ac= _elm_access_info_get(obj);
2656 if (!ac) return; 2663 if (!ac) return;
2664
2665 /* check whether the hover object is visible or not */
2666 if (!evas_object_visible_get(ac->hoverobj))
2667 return;
2657 } 2668 }
2669 else if (!elm_widget_can_focus_get(obj))
2670 return;
2658 2671
2659 if (elm_widget_focus_get(obj)) 2672 if (elm_widget_focus_get(obj))
2660 { 2673 {