win: set NULL to focus_highlight.prev.target when it's deleted.
authorWooHyun Jung <wh0705.jung@samsung.com>
Fri, 23 May 2014 02:07:59 +0000 (11:07 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Fri, 23 May 2014 02:07:59 +0000 (11:07 +0900)
src/lib/elm_win.c

index 5976315c7c2e36e4b8c2543368f04db147dd486d..68e603ee6569ec49e57ef5ca0394b97758f22182 100644 (file)
@@ -805,6 +805,16 @@ _elm_win_focus_highlight_simple_setup(Elm_Win_Data *sd,
    edje_object_signal_emit(obj, "elm,state,anim,stop", "elm");
 }
 
+static void
+_elm_win_focus_prev_target_del(void *data,
+                               Evas *e EINA_UNUSED,
+                               Evas_Object *obj EINA_UNUSED,
+                               void *event_info EINA_UNUSED)
+{
+   ELM_WIN_DATA_GET(data, sd);
+   sd->focus_highlight.prev.target = NULL;
+}
+
 static void
 _elm_win_focus_highlight_reconfigure_job(void *data)
 {
@@ -829,8 +839,12 @@ _elm_win_focus_highlight_reconfigure_job(void *data)
      return;
 
    if ((previous) && (sd->focus_highlight.prev.in_theme))
-     elm_widget_signal_emit
-       (previous, "elm,action,focus_highlight,hide", "elm");
+     {
+        evas_object_event_callback_del_full
+           (previous, EVAS_CALLBACK_DEL, _elm_win_focus_prev_target_del, data);
+        elm_widget_signal_emit
+           (previous, "elm,action,focus_highlight,hide", "elm");
+     }
 
    if (!target)
      common_visible = EINA_FALSE;
@@ -891,6 +905,9 @@ the_end:
    _elm_win_focus_highlight_visible_set(sd, common_visible);
    sd->focus_highlight.geometry_changed = EINA_FALSE;
    sd->focus_highlight.prev = sd->focus_highlight.cur;
+   evas_object_event_callback_add
+     (sd->focus_highlight.prev.target,
+      EVAS_CALLBACK_DEL, _elm_win_focus_prev_target_del, data);
 }
 
 static void