aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/lib/elm_win.c
diff options
context:
space:
mode:
authorJaehwan Kim <jae.hwan.kim@samsung.com>2015-08-13 13:45:21 +0900
committerJaehwan Kim <jae.hwan.kim@samsung.com>2015-08-13 13:58:04 +0900
commit1bc01460c4a0a15644c9f76f7885b6c14bf1c651 (patch)
tree26c48e7dd7c2b6540f88b2348d0f96976039bcf2 /legacy/elementary/src/lib/elm_win.c
parenttest_gengrid: change the min size of gengrid (diff)
downloadefl-1bc01460c4a0a15644c9f76f7885b6c14bf1c651.tar.gz
focus: item focus moves by geometry.
In the widget code, focus origin is added. It can know the focus movement is originated by which action. The widgets can choose the item focus moves to last focused item or geometrically nearby item by focus origin. In gengrid, focus moves to last focused item if focus origin is ELM_FOCUS_REVERT. It moves to nearby item if focus origin is from ELM_FOCUS_UP to ELM_FOCUS_LEFT. TODO: widgets have items should add the direction feature if it want the focus to move to nearby item. @feature
Diffstat (limited to 'legacy/elementary/src/lib/elm_win.c')
-rw-r--r--legacy/elementary/src/lib/elm_win.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index 9f729dd420..337929f671 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -880,6 +880,14 @@ _elm_win_focus_highlight_visible_set(Elm_Win_Data *sd,
}
}
+Evas_Object *
+_elm_win_focus_highlight_object_get(Evas_Object *obj)
+{
+ ELM_WIN_DATA_GET(obj, sd);
+
+ return sd->focus_highlight.fobj;
+}
+
static void
_elm_win_focus_highlight_anim_setup(Elm_Win_Data *sd,
Evas_Object *obj)
@@ -992,7 +1000,15 @@ _elm_win_focus_highlight_reconfigure_job(void *data)
elm_widget_signal_emit(target, sig, "elm");
if ((!target) || (!common_visible) || (sd->focus_highlight.cur.in_theme))
- goto the_end;
+ {
+ if (target)
+ {
+ Elm_Focus_Direction focus_origin = elm_widget_focus_origin_get(target);
+ if (focus_origin >= ELM_FOCUS_UP && focus_origin <= ELM_FOCUS_LEFT)
+ _elm_win_focus_highlight_simple_setup(sd, fobj);
+ }
+ goto the_end;
+ }
if (previous)
focus_style_previous = elm_widget_focus_highlight_style_get(previous);