summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_config.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2018-03-27 14:08:04 +0200
committerMarcel Hollerbach <marcel@osg.samsung.com>2018-03-28 10:48:01 +0200
commit8fa22f2ab75f940303c38c204b44cfaa72b89feb (patch)
tree2772364ba8d4a49c33779fcd4a68550768a5170a /src/lib/elementary/elm_config.c
parente40f25b67ea1f68c890725f515f8d8ae2ef0b1fb (diff)
elm_config: add new infra for reloading config into the widget tree
fix T6792
Diffstat (limited to 'src/lib/elementary/elm_config.c')
-rw-r--r--src/lib/elementary/elm_config.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 16063906c8..4504b41f50 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -3445,6 +3445,40 @@ elm_config_focus_move_policy_get(void)
3445 return _elm_config->focus_move_policy; 3445 return _elm_config->focus_move_policy;
3446} 3446}
3447 3447
3448static void
3449_efl_ui_widget_config_reload(Efl_Ui_Widget *obj)
3450{
3451 Elm_Focus_Move_Policy focus_move_policy = elm_config_focus_move_policy_get();
3452 ELM_WIDGET_DATA_GET_OR_RETURN(obj, sd);
3453 Efl_Ui_Widget *w;
3454 Eina_List *n;
3455
3456 //reload focus move policy
3457 if (efl_ui_widget_focus_move_policy_automatic_get(obj) &&
3458 (sd->focus_move_policy != focus_move_policy))
3459 {
3460 sd->focus_move_policy = focus_move_policy;
3461 }
3462
3463 EINA_LIST_FOREACH(sd->subobjs, n, w)
3464 {
3465 if (efl_isa(w, EFL_UI_WIDGET_CLASS))
3466 _efl_ui_widget_config_reload(w);
3467 }
3468}
3469
3470void
3471_elm_win_focus_reconfigure(void)
3472{
3473 const Eina_List *l;
3474 Evas_Object *obj;
3475
3476 EINA_LIST_FOREACH(_elm_win_list, l, obj)
3477 {
3478 _efl_ui_widget_config_reload(obj);
3479 }
3480}
3481
3448EAPI void 3482EAPI void
3449elm_config_focus_move_policy_set(Elm_Focus_Move_Policy policy) 3483elm_config_focus_move_policy_set(Elm_Focus_Move_Policy policy)
3450{ 3484{