summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2014-04-17 15:23:00 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-04-17 15:48:04 +0900
commit634c4b7ec0af18e52603fa47bec38096969d489c (patch)
treedec53010275c4aa8255f51d6645f6da732fe2032
parentc3413c3387dd71f34e9453f1af39cc557ab594a6 (diff)
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 Conflicts: src/lib/elc_ctxpopup.c
-rw-r--r--src/lib/elc_ctxpopup.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c
index 979f62235..812a97807 100644
--- a/src/lib/elc_ctxpopup.c
+++ b/src/lib/elc_ctxpopup.c
@@ -130,19 +130,16 @@ _elm_ctxpopup_smart_event(Eo *obj, void *_pd, va_list *list)
130 if (type != EVAS_CALLBACK_KEY_DOWN) return; 130 if (type != EVAS_CALLBACK_KEY_DOWN) return;
131 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; 131 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
132 132
133 if (!strcmp(ev->key, "Tab"))
134 {
135 if (evas_key_modifier_is_set(ev->modifiers, "Shift"))
136 elm_widget_focus_cycle(sd->box, ELM_FOCUS_PREVIOUS);
137 else
138 elm_widget_focus_cycle(sd->box, ELM_FOCUS_NEXT);
139 if (ret) *ret = EINA_TRUE;
140 return;
141 }
142
143 if (sd->box) 133 if (sd->box)
144 { 134 {
145 if ((!strcmp(ev->key, "Left")) || 135 if (!strcmp(ev->key, "Tab"))
136 {
137 if (evas_key_modifier_is_set(ev->modifiers, "Shift"))
138 elm_widget_focus_cycle(sd->box, ELM_FOCUS_PREVIOUS);
139 else
140 elm_widget_focus_cycle(sd->box, ELM_FOCUS_NEXT);
141 }
142 else if ((!strcmp(ev->key, "Left")) ||
146 ((!strcmp(ev->key, "KP_Left")) && (!ev->string))) 143 ((!strcmp(ev->key, "KP_Left")) && (!ev->string)))
147 elm_widget_focus_cycle(sd->box, ELM_FOCUS_LEFT); 144 elm_widget_focus_cycle(sd->box, ELM_FOCUS_LEFT);
148 else if ((!strcmp(ev->key, "Right")) || 145 else if ((!strcmp(ev->key, "Right")) ||