From: Shinwoo Kim Date: Wed, 29 Nov 2017 14:06:01 +0000 (+0530) Subject: elm: access: do not handle events if window is not activated. An activated window... X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~860 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2178f95916a2f0571884c561d9e269fede273be5;p=platform%2Fupstream%2Fefl.git elm: access: do not handle events if window is not activated. An activated window and the stater process could call "NotifyListenersSync" method, which makes atspi_register_keystroke_listener be called twice. Change-Id: I9f0ac923e156a8d0be7d0e16251cd833fd62b845 Signed-off-by: Shilpa Singh --- diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index 5fdb1b3..b533627 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -127,6 +127,9 @@ typedef struct _Elm_Atspi_Bridge_Data Evas_Point socket_offset; // Eina_Bool connected : 1; + // TIZEN_ONLY(20160802): do not handle events if the window is not activated + Eina_Bool window_activated : 1; + // } Elm_Atspi_Bridge_Data; @@ -4068,6 +4071,13 @@ _state_changed_signal_send(void *data, const Efl_Event *event) const char *type_desc; ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(data, pd); + // TIZEN_ONLY(20160802): do not handle events if the window is not activated + if ((state_data->type == EFL_ACCESS_STATE_ACTIVE) && efl_isa(event->object, EFL_UI_WIN_CLASS)) + { + pd->window_activated = state_data->new_value; + } + // + if (!STATE_TYPE_GET(pd->object_state_broadcast_mask, state_data->type)) { efl_event_callback_stop(event->object); @@ -4537,10 +4547,16 @@ _bridge_cache_build(Eo *bridge, void *obj) if (STATE_TYPE_GET(ss, EFL_ACCESS_STATE_ACTIVE)) { efl_access_window_activated_signal_emit(obj); + // TIZEN_ONLY(20160802): do not handle events if the window is not activated + pd->window_activated = EINA_TRUE; + // } else { efl_access_window_deactivated_signal_emit(obj); + // TIZEN_ONLY(20160802): do not handle events if the window is not activated + pd->window_activated = EINA_FALSE; + // } } children = efl_access_children_get(obj); @@ -4966,6 +4982,10 @@ _elm_atspi_bridge_key_filter(void *data, void *loop EINA_UNUSED, int type, void ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN_VAL(bridge, pd, EINA_TRUE); + // TIZEN_ONLY(20160802): do not handle events if the window is not activated + if (!pd->window_activated) return EINA_TRUE; + // + if ((type != ECORE_EVENT_KEY_DOWN) && (type != ECORE_EVENT_KEY_UP)) return EINA_TRUE; // check if reemited