summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWooHyun Jung <wh0705.jung@samsung.com>2014-07-04 11:16:59 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2014-07-04 11:16:59 +0900
commita3a41cec1d8bc28b7aed10038fdad598e88a3a50 (patch)
treefc1723e732b882510b0a463e0448b3b2e0326b20
parent467adad7808a60cc16e872b888ff451730f92d8d (diff)
focus: when focus_highlight is enabled, it should be shown immediately.
-rw-r--r--src/bin/test_focus.c21
-rw-r--r--src/lib/elm_win.c11
2 files changed, 30 insertions, 2 deletions
diff --git a/src/bin/test_focus.c b/src/bin/test_focus.c
index b45022995..d7cef0291 100644
--- a/src/bin/test_focus.c
+++ b/src/bin/test_focus.c
@@ -60,6 +60,15 @@ _tb_sel(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
60} 60}
61 61
62static void 62static void
63_focus_highlight_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
64{
65 if (elm_check_state_get(obj))
66 elm_win_focus_highlight_enabled_set(data, EINA_TRUE);
67 else
68 elm_win_focus_highlight_enabled_set(data, EINA_FALSE);
69}
70
71static void
63_focus_anim_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 72_focus_anim_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
64{ 73{
65 if (elm_check_state_get(obj)) 74 if (elm_check_state_get(obj))
@@ -429,9 +438,19 @@ test_focus(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
429 438
430 { 439 {
431 Evas_Object *ck; 440 Evas_Object *ck;
441
442 ck = elm_check_add(bx);
443 elm_object_text_set(ck, "Focus Highlight Enable");
444 elm_check_state_set(ck, elm_win_focus_highlight_enabled_get(win));
445 elm_box_pack_end(bx, ck);
446 my_show(ck);
447 evas_object_smart_callback_add(ck, "changed",
448 _focus_highlight_changed,
449 win);
450
432 ck = elm_check_add(bx); 451 ck = elm_check_add(bx);
433 elm_object_text_set(ck, "Focus Highlight Animation Enable"); 452 elm_object_text_set(ck, "Focus Highlight Animation Enable");
434 elm_check_state_set(ck, elm_config_focus_highlight_animate_get()); 453 elm_check_state_set(ck, elm_win_focus_highlight_animate_get(win));
435 elm_box_pack_end(bx, ck); 454 elm_box_pack_end(bx, ck);
436 my_show(ck); 455 my_show(ck);
437 evas_object_smart_callback_add(ck, "changed", 456 evas_object_smart_callback_add(ck, "changed",
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 11ca2d35a..80e0ce1bc 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -2281,7 +2281,16 @@ _elm_win_focus_highlight_init(Elm_Win_Data *sd)
2281 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, 2281 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT,
2282 _elm_win_object_focus_out, sd->obj); 2282 _elm_win_object_focus_out, sd->obj);
2283 2283
2284 sd->focus_highlight.cur.target = NULL; 2284 sd->focus_highlight.cur.target = _elm_win_focus_target_get(evas_focus_get(sd->evas));
2285 if (sd->focus_highlight.cur.target)
2286 {
2287 if (elm_widget_highlight_in_theme_get(sd->focus_highlight.cur.target))
2288 sd->focus_highlight.cur.in_theme = EINA_TRUE;
2289 else
2290 _elm_win_focus_target_callbacks_add(sd);
2291 }
2292
2293 sd->focus_highlight.prev.target = NULL;
2285 sd->focus_highlight.fobj = edje_object_add(sd->evas); 2294 sd->focus_highlight.fobj = edje_object_add(sd->evas);
2286 sd->focus_highlight.theme_changed = EINA_TRUE; 2295 sd->focus_highlight.theme_changed = EINA_TRUE;
2287 2296