elm: atspi: set _accessibility_currently_highlighted_obj to NULL in object delete...
authorShinwoo Kim <cinoo.kim@samsung.com>
Wed, 29 Nov 2017 08:38:05 +0000 (14:08 +0530)
committerJiyoun Park <jy0703.park@samsung.com>
Thu, 21 Dec 2017 10:35:44 +0000 (19:35 +0900)
Change-Id: Iabb179b6d9b88d74c45345b6855610085720df6b
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>
src/lib/elementary/efl_ui_win.c
src/lib/elementary/elm_gengrid.c
src/lib/elementary/elm_genlist.c
src/lib/elementary/elm_list.c

index 43e6c55..06e972e 100644 (file)
@@ -2762,11 +2762,14 @@ _efl_ui_win_efl_canvas_seat_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int id
 static void
 _elm_win_accessibility_highlight_obj_del(void *data,
                            Evas *e EINA_UNUSED,
-                           Evas_Object *obj EINA_UNUSED,
+                           Evas_Object *obj,
                            void *event_info EINA_UNUSED)
 {
    ELM_WIN_DATA_GET(data, sd);
-
+   // TIZEN_ONLY(20160805): set _accessibility_currently_highlighted_obj to NULL in object delete callback
+   /* set _accessibility_currently_highlighted_obj to NULL */
+   elm_object_accessibility_highlight_set(obj, EINA_FALSE);
+   //
    _elm_win_accessibility_highlight_hide(sd->obj);
 }
 
index a214b92..bd6efff 100644 (file)
@@ -5913,6 +5913,13 @@ _elm_gengrid_elm_interface_scrollable_content_pos_set(Eo *obj, Elm_Gengrid_Data
           if (parent == obj)
             break;
      }
+   // TIZEN_ONLY(20160805): set _accessibility_currently_highlighted_obj to NULL in object delete callback
+   else
+     {
+        WRN("Improper highlighted object: %p", highlighted_obj);
+        return;
+     }
+    //
     if (parent)
       {
         int obj_x, obj_y, w, h, hx, hy, hw, hh;
index a31f340..accb098 100644 (file)
@@ -8897,36 +8897,39 @@ static Eina_Bool _atspi_enabled()
 EOLIAN static void
 _elm_genlist_elm_interface_scrollable_content_pos_set(Eo *obj, Elm_Genlist_Data *sid EINA_UNUSED, Evas_Coord x, Evas_Coord y, Eina_Bool sig)
 {
-    if (!_atspi_enabled())
-      {
-        elm_interface_scrollable_content_pos_set(efl_super(obj, MY_CLASS), x, y, sig);
-        return;
-      }
+   if (!_atspi_enabled())
+     {
+       elm_interface_scrollable_content_pos_set(efl_super(obj, MY_CLASS), x, y, sig);
+       return;
+     }
 
-    int old_x, old_y, delta_y;
-    elm_interface_scrollable_content_pos_get(efl_super(obj, MY_CLASS), &old_x, &old_y);
-    elm_interface_scrollable_content_pos_set(efl_super(obj, MY_CLASS), x, y, sig);
-    delta_y = old_y - y;
-
-    //check if highlighted item is genlist descendant
-    // TIZEN_ONLY(20171114) Accessibility Highlight Frame added
-    // Evas_Object *win = elm_object_top_widget_get(obj);
-    // Evas_Object *highlighted_obj = _elm_win_accessibility_highlight_get(win);
-    Evas_Object * highlighted_obj = _elm_object_accessibility_currently_highlighted_get();
-    //
-    Evas_Object *parent = highlighted_obj;
-    if (efl_isa(highlighted_obj, ELM_WIDGET_CLASS))
-      {
+   int old_x, old_y, delta_y;
+   elm_interface_scrollable_content_pos_get(efl_super(obj, MY_CLASS), &old_x, &old_y);
+   elm_interface_scrollable_content_pos_set(efl_super(obj, MY_CLASS), x, y, sig);
+   delta_y = old_y - y;
+
+   //check if highlighted item is genlist descendant
+   Evas_Object * highlighted_obj = _elm_object_accessibility_currently_highlighted_get();
+   Evas_Object *parent = highlighted_obj;
+   if (efl_isa(highlighted_obj, ELM_WIDGET_CLASS))
+     {
         while ((parent = elm_widget_parent_get(parent)))
           if (parent == obj)
             break;
-      }
-    else if (efl_isa(highlighted_obj, EDJE_OBJECT_CLASS))
-      {
+     }
+   else if (efl_isa(highlighted_obj, EDJE_OBJECT_CLASS))
+     {
         while ((parent = evas_object_smart_parent_get(parent)))
           if (parent == obj)
             break;
-      }
+     }
+   // TIZEN_ONLY(20160805): set _accessibility_currently_highlighted_obj to NULL in object delete callback
+   else
+     {
+        WRN("Improper highlighted object: %p", highlighted_obj);
+        return;
+     }
+   //
     if (parent)
       {
         int obj_x, obj_y, w, h, hx, hy, hw, hh;
index 3bbe2e8..2006b1d 100644 (file)
@@ -3322,7 +3322,13 @@ _elm_list_elm_interface_scrollable_content_pos_set(Eo *obj EINA_UNUSED, Elm_List
            if (parent == obj)
              break;
      }
-
+   // TIZEN_ONLY(20160805): set _accessibility_currently_highlighted_obj to NULL in object delete callback
+   else
+     {
+        WRN("Improper highlighted object: %p", highlighted_obj);
+        return;
+     }
+   //
    if (parent)
      {
          int obj_x, obj_y, w, h, hx, hy, hw, hh;