ctxpopup: sd->box null check and event_flag set for previous and next focus move.

Summary:
The original code was missing
- null check of sd->box
- event_flag value set
for previous and next focus move.
@fix

Test Plan: None

Reviewers: raster, seoz, Hermet

Differential Revision: https://phab.enlightenment.org/D753
This commit is contained in:
Jaeun Choi 2014-04-17 15:23:00 +09:00 committed by ChunEon Park
parent f2bb1364e8
commit bde04f61e9
1 changed files with 8 additions and 10 deletions

View File

@ -103,18 +103,16 @@ _elc_ctxpopup_elm_widget_event(Eo *obj, Elc_Ctxpopup_Data *sd, Evas_Object *src,
if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (!strcmp(ev->key, "Tab"))
{
if (evas_key_modifier_is_set(ev->modifiers, "Shift"))
elm_widget_focus_cycle(sd->box, ELM_FOCUS_PREVIOUS);
else
elm_widget_focus_cycle(sd->box, ELM_FOCUS_NEXT);
return EINA_TRUE;
}
if (sd->box)
{
if ((!strcmp(ev->key, "Left")) ||
if (!strcmp(ev->key, "Tab"))
{
if (evas_key_modifier_is_set(ev->modifiers, "Shift"))
elm_widget_focus_cycle(sd->box, ELM_FOCUS_PREVIOUS);
else
elm_widget_focus_cycle(sd->box, ELM_FOCUS_NEXT);
}
else if ((!strcmp(ev->key, "Left")) ||
((!strcmp(ev->key, "KP_Left")) && (!ev->string)))
elm_widget_focus_cycle(sd->box, ELM_FOCUS_LEFT);
else if ((!strcmp(ev->key, "Right")) ||