Edje entry: fix bug preedit text is committed in the next entry when Tab key is pressed.

Key events which ecore_imf_context_filter_event function returns EINA_TRUE should be not propagated.

@fix
This commit is contained in:
Jihoon Kim 2014-03-06 11:17:34 +09:00
parent ef09ef7489
commit 71f296e171
1 changed files with 5 additions and 26 deletions

View File

@ -1342,37 +1342,16 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
if (en->imf_context)
{
Ecore_IMF_Event_Key_Down ecore_ev;
Eina_Bool filter_ret;
ecore_imf_evas_event_key_down_wrap(ev, &ecore_ev);
if (!en->composing)
{
filter_ret = ecore_imf_context_filter_event(en->imf_context,
ECORE_IMF_EVENT_KEY_DOWN,
(Ecore_IMF_Event *)&ecore_ev);
if (en->have_preedit)
if (ecore_imf_context_filter_event(en->imf_context,
ECORE_IMF_EVENT_KEY_DOWN,
(Ecore_IMF_Event *)&ecore_ev))
{
if (!strcmp(ev->key, "Down") ||
(!strcmp(ev->key, "KP_Down") && !ev->string) ||
!strcmp(ev->key, "Up") ||
(!strcmp(ev->key, "KP_Up") && !ev->string) ||
!strcmp(ev->key, "Left") ||
(!strcmp(ev->key, "KP_Left") && !ev->string) ||
!strcmp(ev->key, "Right") ||
(!strcmp(ev->key, "KP_Right") && !ev->string) ||
!strcmp(ev->key, "Next") ||
(!strcmp(ev->key, "KP_Next") && !ev->string) ||
!strcmp(ev->key, "Prior") ||
(!strcmp(ev->key, "KP_Prior") && !ev->string) ||
!strcmp(ev->key, "Home") ||
(!strcmp(ev->key, "KP_Home") && !ev->string) ||
!strcmp(ev->key, "End") ||
(!strcmp(ev->key, "KP_End") && !ev->string))
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return;
}
if (filter_ret)
return;
}
}
#endif