efl_ui_focus_object: fixup properties that are used for event infos.
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Mon, 11 Mar 2019 21:47:05 +0000 (17:47 -0400)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 15 Mar 2019 04:23:20 +0000 (13:23 +0900)
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
src/lib/elementary/elm_main.c

index eb35d45..de38094 100644 (file)
@@ -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);
 }
 
index b832a3e..05f563b 100644 (file)
@@ -49,7 +49,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);
 }