atspi: check if highlighted object's parent hidden
authorShinwoo Kim <cinoo.kim@samsung.com>
Fri, 23 Dec 2016 08:40:06 +0000 (17:40 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 05:37:13 +0000 (14:37 +0900)
If an object is content of a layout (parent), and user calls evas_object_hide for the layout,
then the _elm_widget_evas_object_smart_hide for the object (child) is not called.
So it is not possible to know object's changed state on the AT-client side.

This patch set will check parents of highlighted object in _elm_widget_evas_object_smart_hide,
and emit state changed signal if one of parents is equal to the hiding object.

Change-Id: Ic91a06a039c6a4f254db0e4216edf7a73756c5aa

src/lib/elm_widget.c

index 84429d8d53bd9910b0230a079ac13ae2d35c57e6..93f2f8974de40f24ba6777a276782ccf8d8cd676 100644 (file)
@@ -598,7 +598,29 @@ _elm_widget_evas_object_smart_hide(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUS
    eina_iterator_free(it);
 
    if (_elm_atspi_enabled())
-     elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_SHOWING, EINA_FALSE);
+     {
+        //TIZEN_ONLY(20161223) check if the parent of highlighted object is hide
+        Eo *highlighted_obj;
+        highlighted_obj = _elm_object_accessibility_currently_highlighted_get();
+        if (highlighted_obj && highlighted_obj != obj)
+          {
+             Eo *parent;
+             eo_do(highlighted_obj, parent = elm_interface_atspi_accessible_parent_get());
+             while (parent)
+               {
+                  if (parent == obj)
+                    {
+                       elm_interface_atspi_accessible_state_changed_signal_emit(highlighted_obj, ELM_ATSPI_STATE_SHOWING, EINA_FALSE);
+                       eo_do(highlighted_obj, elm_interface_atspi_component_highlight_clear());
+                       break;
+                    }
+                  eo_do(parent, parent = elm_interface_atspi_accessible_parent_get());
+               }
+          }
+        //
+
+        elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_SHOWING, EINA_FALSE);
+     }
 }
 
 EOLIAN static void