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)
downloadelementary-859f31102e9b4d776a144872a4b839cc509a9628.tar.gz
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)
}
sd->focus_highlight.prev.target = NULL;
- sd->focus_highlight.fobj = edje_object_add(sd->evas);
sd->focus_highlight.theme_changed = EINA_TRUE;
+ if (!sd->focus_highlight.fobj)
+ {
+ sd->focus_highlight.fobj = edje_object_add(sd->evas);
+ edje_object_signal_callback_add(sd->focus_highlight.fobj,
+ "elm,action,focus,hide,end", "*",
+ _elm_win_focus_highlight_hide, NULL);
+ edje_object_signal_callback_add(sd->focus_highlight.fobj,
+ "elm,action,focus,anim,end", "*",
+ _elm_win_focus_highlight_anim_end, sd->obj);
+ }
- edje_object_signal_callback_add(sd->focus_highlight.fobj,
- "elm,action,focus,hide,end", "*",
- _elm_win_focus_highlight_hide, NULL);
- edje_object_signal_callback_add(sd->focus_highlight.fobj,
- "elm,action,focus,anim,end", "*",
- _elm_win_focus_highlight_anim_end, sd->obj);
_elm_win_focus_highlight_reconfigure_job_start(sd);
}