From 76a2bd931286a37d6697448020a898ae3b210e9f Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Fri, 23 Sep 2016 10:08:01 +0900 Subject: [PATCH] elm: _propagate_event should react only when the obj is focused obj In efl_ui_win, _evas_event_key_cb gives efl_event_callback_call, though the focused object is not the window itself. Becuase of this, _propagate_event was called twice for event single key down. So, now, _propagate_event returns itself whenever focused object is not the win but it's called from efl_ui_win's event call. The problem can be checked with following stpes. 1. elementary_test -> focus 2. Input any directions (ex: Down) 3. Focus movement happens twice for every single input. --- src/lib/elementary/elm_widget.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 1b7a94cc87..86514a3afe 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -728,6 +728,10 @@ _propagate_event(void *data EINA_UNUSED, const Efl_Event *event) } event_info = {}; Eina_Bool was_hold; + if ((evas_focus_get(evas_object_evas_get(obj)) != elm_widget_top_get(obj)) && + efl_isa(obj, EFL_UI_WIN_CLASS)) + return; + /* FIXME: Avoid this translation to evas struct and use pointer/key events * in all of elementary widgets * See also: efl_input_key_legacy_info_fill().