From 991c2333ed608cb009b268196fc343e39b411ee8 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 11 Mar 2019 17:47:05 -0400 Subject: [PATCH] efl_ui_focus_object: fixup properties that are used for event infos. Summary: those are the completly wrong properties, please be carefull with this. There is a major difference between focus_geometry and geometry on the entity. In a viewport for example its the viewport itself - the bars at the side. Additionally, not every focus object is a efl.gfx.entity. this fixes a giant amount of errors when you try to test terminology, emixer, toolbar tests or something like this. fixup 1d9fef8da6fb4f679113d9dc4f57f1520fd31936 Reviewers: cedric, segfaultxavi, zmike Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8300 --- src/lib/elementary/efl_ui_focus_composition.c | 3 +-- src/lib/elementary/elm_main.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_composition.c b/src/lib/elementary/efl_ui_focus_composition.c index eb35d45bf6..de38094c62 100644 --- a/src/lib/elementary/efl_ui_focus_composition.c +++ b/src/lib/elementary/efl_ui_focus_composition.c @@ -234,8 +234,7 @@ _canvas_object_deleted(void *data, const Efl_Event *ev EINA_UNUSED) static void _new_geom(void *data, const Efl_Event *event EINA_UNUSED) { - Efl_Ui_Focus_Composition_Adapter_Data *pd = efl_data_scope_get(data, EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS); - Eina_Rect rect = efl_gfx_entity_geometry_get(pd->object); + Eina_Rect rect = efl_ui_focus_object_focus_geometry_get(data); efl_event_callback_call(data, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_GEOMETRY_CHANGED, &rect); } diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c index 1769634d21..bd0f0b7d38 100644 --- a/src/lib/elementary/elm_main.c +++ b/src/lib/elementary/elm_main.c @@ -46,7 +46,7 @@ EAPI Elm_Version *elm_version = &_version; static void _focus_ev_redirect_cb(void *data, const Efl_Event *ev EINA_UNUSED) { - Eina_Rect rect = efl_gfx_entity_geometry_get(data); + Eina_Rect rect = efl_ui_focus_object_focus_geometry_get(data); efl_event_callback_call(data, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_GEOMETRY_CHANGED, &rect); }