summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_sub.c23
-rw-r--r--src/tests/elementary/elm_test_focus_sub.c6
2 files changed, 27 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c
index 57997afd41..90ac4f7387 100644
--- a/src/lib/elementary/efl_ui_focus_manager_sub.c
+++ b/src/lib/elementary/efl_ui_focus_manager_sub.c
@@ -84,6 +84,7 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd)
84 84
85 eina_list_free(pd->current_border); 85 eina_list_free(pd->current_border);
86 pd->current_border = selection; 86 pd->current_border = selection;
87 pd->self_dirty = EINA_FALSE;
87} 88}
88 89
89static void 90static void
@@ -105,7 +106,7 @@ _parent_manager_pre_flush(void *data, const Efl_Event *ev EINA_UNUSED)
105{ 106{
106 MY_DATA(data, pd); 107 MY_DATA(data, pd);
107 108
108 //if (!pd->self_dirty) return; //we are not interested 109 if (!pd->self_dirty) return; //we are not interested
109 110
110 _border_flush(data, pd); 111 _border_flush(data, pd);
111} 112}
@@ -116,12 +117,27 @@ _redirect_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
116 //if (efl_ui_focus_manager_redirect_get(ev->object) != data) return; 117 //if (efl_ui_focus_manager_redirect_get(ev->object) != data) return;
117 118
118 MY_DATA(data, pd); 119 MY_DATA(data, pd);
120
119 _border_flush(data, pd); 121 _border_flush(data, pd);
120} 122}
121 123
124static void
125_freeze_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
126{
127 if (ev->info)
128 {
129 efl_ui_focus_manager_dirty_logic_freeze(data);
130 }
131 else
132 {
133 efl_ui_focus_manager_dirty_logic_unfreeze(data);
134 }
135}
136
122EFL_CALLBACKS_ARRAY_DEFINE(parent_manager, 137EFL_CALLBACKS_ARRAY_DEFINE(parent_manager,
123 {EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, _parent_manager_pre_flush}, 138 {EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, _parent_manager_pre_flush},
124 {EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, _redirect_changed_cb} 139 {EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, _redirect_changed_cb},
140 {EFL_UI_FOCUS_MANAGER_EVENT_DIRTY_LOGIC_FREEZE_CHANGED, _freeze_changed_cb}
125); 141);
126 142
127static void 143static void
@@ -198,6 +214,9 @@ _efl_ui_focus_manager_sub_efl_object_constructor(Eo *obj, Efl_Ui_Focus_Manager_S
198{ 214{
199 obj = efl_constructor(efl_super(obj, MY_CLASS)); 215 obj = efl_constructor(efl_super(obj, MY_CLASS));
200 efl_event_callback_array_add(obj, self_manager(), obj); 216 efl_event_callback_array_add(obj, self_manager(), obj);
217
218 pd->self_dirty = EINA_TRUE;
219
201 return obj; 220 return obj;
202} 221}
203 222
diff --git a/src/tests/elementary/elm_test_focus_sub.c b/src/tests/elementary/elm_test_focus_sub.c
index 3f100dfae2..5454ecd414 100644
--- a/src/tests/elementary/elm_test_focus_sub.c
+++ b/src/tests/elementary/elm_test_focus_sub.c
@@ -93,6 +93,12 @@ _setup(Efl_Ui_Focus_Manager **m, Efl_Ui_Focus_Manager_Sub **sub, Efl_Ui_Focus_Ob
93 Efl_Ui_Focus_Manager_Calc *subm = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, focus_main, 93 Efl_Ui_Focus_Manager_Calc *subm = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, focus_main,
94 efl_ui_focus_manager_root_set(efl_added, root) 94 efl_ui_focus_manager_root_set(efl_added, root)
95 ); 95 );
96 efl_event_callback_forwarder_add(subm, EFL_UI_FOCUS_MANAGER_EVENT_FLUSH_PRE, focus_main);
97 efl_event_callback_forwarder_add(subm, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, focus_main);
98 efl_event_callback_forwarder_add(subm, EFL_UI_FOCUS_MANAGER_EVENT_FOCUS_CHANGED , focus_main);
99 efl_event_callback_forwarder_add(subm, EFL_UI_FOCUS_MANAGER_EVENT_COORDS_DIRTY, focus_main);
100 efl_event_callback_forwarder_add(subm, EFL_UI_FOCUS_MANAGER_EVENT_DIRTY_LOGIC_FREEZE_CHANGED, focus_main);
101
96 102
97 efl_composite_attach(focus_main, subm); 103 efl_composite_attach(focus_main, subm);
98 104