From 8127f29c466e2e028b2067d438b77e119e410b41 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Thu, 20 Jun 2019 12:54:02 +0200 Subject: [PATCH] evas: emit the corrent event here, it seems we have done here something wrong, EFL_EVENT_FOCUS_IN is meant to be emitted on objects that RECEIVE focus. This function here however is called each time the window gets focus, which then might lead to a object getting focus. However, those are two different things. Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D9137 --- src/lib/evas/canvas/evas_main.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index 27f6a4af4f..20c93874b6 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -854,21 +854,12 @@ _evas_canvas_data_attach_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) } static void -_evas_canvas_focus_inout_dispatch(Eo *eo_e, Evas_Device *seat, +_evas_canvas_focus_inout_dispatch(Eo *eo_e, Evas_Device *seat EINA_UNUSED, Eina_Bool in) { - Efl_Input_Focus_Data *ev_data; - Efl_Input_Focus *evt; - - evt = efl_input_focus_instance_get(eo_e, (void **) &ev_data); - if (!evt) return; - - ev_data->device = efl_ref(seat); - ev_data->timestamp = time(NULL); efl_event_callback_call(eo_e, - in ? EFL_EVENT_FOCUS_IN : EFL_EVENT_FOCUS_OUT, - evt); - efl_unref(evt); + in ? EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_IN : EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_OUT, + NULL); } EOLIAN static void