forked from enlightenment/efl
atspi: set FOCUSABLE state only when widget has no focusable children
AT-SPI2 specification states that active window can have only one widget with FOCUSED state. This differs from elementary design which assumes that whole elementary widget tree branch is focused. Patch assumes that if a widget have no focusable children and can have focus it can be marked as FOCUSABLE on atspi bus.
This commit is contained in:
parent
06f97cd1af
commit
31545f69f8
|
@ -406,7 +406,7 @@ _elm_layout_elm_widget_on_focus(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
|
|||
elm_layout_signal_emit(obj, "elm,action,focus", "elm");
|
||||
evas_object_focus_set(wd->resize_obj, EINA_TRUE);
|
||||
evas_object_smart_callback_call(obj, SIG_LAYOUT_FOCUSED, NULL);
|
||||
if (_elm_config->atspi_mode)
|
||||
if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj))
|
||||
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
|
||||
}
|
||||
else
|
||||
|
@ -414,7 +414,7 @@ _elm_layout_elm_widget_on_focus(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
|
|||
elm_layout_signal_emit(obj, "elm,action,unfocus", "elm");
|
||||
evas_object_focus_set(wd->resize_obj, EINA_FALSE);
|
||||
evas_object_smart_callback_call(obj, SIG_LAYOUT_UNFOCUSED, NULL);
|
||||
if (_elm_config->atspi_mode)
|
||||
if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj))
|
||||
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -5469,7 +5469,7 @@ _elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd)
|
|||
if (!sd->resize_obj)
|
||||
evas_object_focus_set(obj, EINA_TRUE);
|
||||
evas_object_smart_callback_call(obj, SIG_WIDGET_FOCUSED, NULL);
|
||||
if (_elm_config->atspi_mode)
|
||||
if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj))
|
||||
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
|
||||
}
|
||||
else
|
||||
|
@ -5477,7 +5477,7 @@ _elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd)
|
|||
if (!sd->resize_obj)
|
||||
evas_object_focus_set(obj, EINA_FALSE);
|
||||
evas_object_smart_callback_call(obj, SIG_WIDGET_UNFOCUSED, NULL);
|
||||
if (_elm_config->atspi_mode)
|
||||
if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj))
|
||||
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
|
||||
}
|
||||
}
|
||||
|
@ -5632,10 +5632,13 @@ _elm_widget_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Widget_Sma
|
|||
((wy < y) && (wy + wh < y)) || ((wy > y+ h) && (wy + wh > y + h))))
|
||||
STATE_TYPE_SET(states, ELM_ATSPI_STATE_SHOWING);
|
||||
}
|
||||
if (elm_object_focus_get(obj))
|
||||
STATE_TYPE_SET(states, ELM_ATSPI_STATE_FOCUSED);
|
||||
if (elm_object_focus_allow_get(obj))
|
||||
STATE_TYPE_SET(states, ELM_ATSPI_STATE_FOCUSABLE);
|
||||
if (!elm_widget_child_can_focus_get(obj))
|
||||
{
|
||||
if (elm_object_focus_allow_get(obj))
|
||||
STATE_TYPE_SET(states, ELM_ATSPI_STATE_FOCUSABLE);
|
||||
if (elm_object_focus_get(obj))
|
||||
STATE_TYPE_SET(states, ELM_ATSPI_STATE_FOCUSED);
|
||||
}
|
||||
if (!elm_object_disabled_get(obj))
|
||||
{
|
||||
STATE_TYPE_SET(states, ELM_ATSPI_STATE_ENABLED);
|
||||
|
|
Loading…
Reference in New Issue