summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJee-Yong Um <jc9.um@samsung.com>2016-03-04 15:37:17 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-03-04 16:14:37 -0800
commit859f31102e9b4d776a144872a4b839cc509a9628 (patch)
tree20d9d49bed999a53200e2b7534a44276a79dd5b0
parent3410e632fd718a99523a709bf01c4a2f5aaa061a (diff)
win: add check for focus object before adding new one
Summary: Focus object is added repeatedly, when focus is enabled. This patch checks existing focus object. Test Plan: elementary_test -to focus check/uncheck "Focus Highlight Enable" with spacebar Reviewers: Jaehyun_Cho, jpeg, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3689 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/elm_win.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 900a0afe4..70f5392b1 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -2713,15 +2713,18 @@ _elm_win_focus_highlight_init(Elm_Win_Data *sd)
2713 } 2713 }
2714 2714
2715 sd->focus_highlight.prev.target = NULL; 2715 sd->focus_highlight.prev.target = NULL;
2716 sd->focus_highlight.fobj = edje_object_add(sd->evas);
2717 sd->focus_highlight.theme_changed = EINA_TRUE; 2716 sd->focus_highlight.theme_changed = EINA_TRUE;
2717 if (!sd->focus_highlight.fobj)
2718 {
2719 sd->focus_highlight.fobj = edje_object_add(sd->evas);
2720 edje_object_signal_callback_add(sd->focus_highlight.fobj,
2721 "elm,action,focus,hide,end", "*",
2722 _elm_win_focus_highlight_hide, NULL);
2723 edje_object_signal_callback_add(sd->focus_highlight.fobj,
2724 "elm,action,focus,anim,end", "*",
2725 _elm_win_focus_highlight_anim_end, sd->obj);
2726 }
2718 2727
2719 edje_object_signal_callback_add(sd->focus_highlight.fobj,
2720 "elm,action,focus,hide,end", "*",
2721 _elm_win_focus_highlight_hide, NULL);
2722 edje_object_signal_callback_add(sd->focus_highlight.fobj,
2723 "elm,action,focus,anim,end", "*",
2724 _elm_win_focus_highlight_anim_end, sd->obj);
2725 _elm_win_focus_highlight_reconfigure_job_start(sd); 2728 _elm_win_focus_highlight_reconfigure_job_start(sd);
2726} 2729}
2727 2730