summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-07-05 15:09:18 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-07-05 15:09:18 -0400
commit11147284fef1830ad7143714a04f3620a93ffba3 (patch)
tree355053a2a75a9649b6accfa9acf06286f5e88592
parent7b4ff708dc4063731829cc919e056fdc431d6de1 (diff)
efl_ui_focus_manager_root_focus: mirror the focus properties correctly
Summary: this object takes a internal dummy object, and thus the properties should be mirrored to the real root. The focus property on the root of the manager is required that the outer world really sees that the focus is on the root or not. Depends on D6506 Reviewers: zmike, devilhorns Reviewed By: zmike Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6510
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_root_focus.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager_root_focus.c b/src/lib/elementary/efl_ui_focus_manager_root_focus.c
index dfb8715dbf..3070a6f183 100644
--- a/src/lib/elementary/efl_ui_focus_manager_root_focus.c
+++ b/src/lib/elementary/efl_ui_focus_manager_root_focus.c
@@ -180,16 +180,29 @@ _efl_ui_focus_manager_root_focus_canvas_object_set(Eo *obj, Efl_Ui_Focus_Manager
180 { 180 {
181 efl_ui_focus_composition_adapter_canvas_object_set(pd->rect, pd->replacement_object); 181 efl_ui_focus_composition_adapter_canvas_object_set(pd->rect, pd->replacement_object);
182 pd->iterator_list = eina_list_append(pd->iterator_list, pd->replacement_object); 182 pd->iterator_list = eina_list_append(pd->iterator_list, pd->replacement_object);
183
184 } 183 }
185} 184}
186 185
186static void
187_focus_changed(void *data, const Efl_Event *ev)
188{
189 Eo *root;
190
191 root = efl_ui_focus_manager_root_get(data);
192
193 efl_ui_focus_object_focus_set(root, efl_ui_focus_object_focus_get(ev->object));
194}
195
196EFL_CALLBACKS_ARRAY_DEFINE(composition_cb,
197 { EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _focus_changed },
198)
187 199
188EOLIAN static Efl_Object* 200EOLIAN static Efl_Object*
189_efl_ui_focus_manager_root_focus_efl_object_constructor(Eo *obj, Efl_Ui_Focus_Manager_Root_Focus_Data *pd) 201_efl_ui_focus_manager_root_focus_efl_object_constructor(Eo *obj, Efl_Ui_Focus_Manager_Root_Focus_Data *pd)
190{ 202{
191 pd->rect = efl_add_ref(EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS, NULL); 203 pd->rect = efl_add_ref(EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS, NULL);
192 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->rect, NULL); 204 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->rect, NULL);
205 efl_event_callback_array_add(pd->rect, composition_cb(), obj);
193 206
194 return efl_constructor(efl_super(obj, MY_CLASS)); 207 return efl_constructor(efl_super(obj, MY_CLASS));
195} 208}