From bde04f61e94e6b7dbf22133e1f307604e2ed1c6e Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Thu, 17 Apr 2014 15:23:00 +0900 Subject: [PATCH] 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 --- legacy/elementary/src/lib/elc_ctxpopup.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/legacy/elementary/src/lib/elc_ctxpopup.c b/legacy/elementary/src/lib/elc_ctxpopup.c index 0812098bbd..5dffe28155 100644 --- a/legacy/elementary/src/lib/elc_ctxpopup.c +++ b/legacy/elementary/src/lib/elc_ctxpopup.c @@ -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")) ||