[ATSPI] Modify clear only specified objects when called highlight_clear 22/125622/3
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 18 Apr 2017 06:19:46 +0000 (15:19 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 21 Apr 2017 00:19:29 +0000 (17:19 -0700)
   In the past, highlight clear cleared all highlight
   in the window. When a user calls highlight_grab manually,
   highlight_clear on highlighted object causes all highlight to disappear.
   So we modify it to clear the object specified in highlight_clear.

Change-Id: I0b07f6bbbf3eecd35eff5c7fc380e634140e182c

src/lib/elm_main.c
src/lib/elm_widget.h
src/lib/elm_win.c

index 55f53f7..e2cfdb8 100644 (file)
@@ -1918,21 +1918,21 @@ elm_object_accessibility_highlight_set(void *obj, Eina_Bool visible)
           _accessibility_currently_highlighted_obj = obj;
      }
 
-   if (visible)
+   if (elm_widget_access_highlight_in_theme_get(target))
      {
-       if (elm_widget_access_highlight_in_theme_get(target))
-          elm_widget_signal_emit(target, "elm,action,access_highlight,show", "elm");
+       if (visible)
+         {
+           elm_widget_signal_emit(target, "elm,action,access_highlight,show", "elm");
+         }
        else
-          _elm_win_object_set_accessibility_highlight(win, target);
+         {
+           elm_widget_signal_emit(target, "elm,action,access_highlight,hide", "elm");
+         }
      }
    else
      {
-       if (elm_widget_access_highlight_in_theme_get(target))
-          elm_widget_signal_emit(target, "elm,action,access_highlight,hide", "elm");
-       else
-          _elm_win_object_set_accessibility_highlight(win, NULL);
+        _elm_win_object_set_accessibility_highlight(win, target, visible);
      }
-
 }
 //
 
index f6e3320..e9815ca 100644 (file)
@@ -577,7 +577,7 @@ Evas_Object          *_elm_win_focus_highlight_object_get(Evas_Object *obj);
 void                  _elm_win_focus_auto_show(Evas_Object *obj);
 void                  _elm_win_focus_auto_hide(Evas_Object *obj);
 //TIZEN_ONLY(20160404) Accessibility Highlight Frame added (99248ce)
-void                  _elm_win_object_set_accessibility_highlight(Evas_Object *win, Evas_Object *obj);
+void                  _elm_win_object_set_accessibility_highlight(Evas_Object *win, Evas_Object *obj, Eina_Bool visible);
 //
 void                 *_elm_object_accessibility_currently_highlighted_get();
 
index 6155ebe..9305cf7 100644 (file)
@@ -6831,20 +6831,20 @@ _elm_win_focus_auto_hide(Evas_Object *obj)
 }
 
 void
-_elm_win_object_set_accessibility_highlight(Evas_Object *win, Evas_Object *obj)
+_elm_win_object_set_accessibility_highlight(Evas_Object *win, Evas_Object *obj, Eina_Bool visible)
 {
    if (!win) return;
    ELM_WIN_DATA_GET(win, sd);
-   _elm_win_accessibility_highlight_hide(win);
-   _elm_win_accessibility_highlight_callbacks_del(sd);
-   if (obj)
+   if (visible || sd->accessibility_highlight.cur.target == obj)
      {
-         _elm_win_accessibility_highlight_init(sd, obj);
-         _elm_win_accessibility_highlight_show(win);
+         _elm_win_accessibility_highlight_hide(win);
+         _elm_win_accessibility_highlight_callbacks_del(sd);
      }
-   else
+
+   if (visible)
      {
-         _elm_win_accessibility_highlight_hide(win);
+         _elm_win_accessibility_highlight_init(sd, obj);
+         _elm_win_accessibility_highlight_show(win);
      }
 }