summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2018-04-07 14:47:00 +0200
committerMarcel Hollerbach <marcel@osg.samsung.com>2018-04-09 18:05:27 +0200
commit39af0ebde0ac7e6c8bdbc59e3796c1e46b6da3fa (patch)
tree9dc4e008baf8dd1ae7ed5425642b4fda13b33064
parent6f6384f0bb484ddc917eb53ec605cafff8576fa9 (diff)
elm_hoversel: make the keyevent handlers work again
i am not sure when this stopped working, elm hover sends focus to the children it has, thus the propergation line for the key down events is going from the hover up accross the over parent, however, the hoverparent can be different to the hoversel, which would lead to missing navigation in the hoversel. this fixes T6802
-rw-r--r--src/lib/elementary/elc_hoversel.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/elementary/elc_hoversel.c b/src/lib/elementary/elc_hoversel.c
index fa7efe5522..1beb702e31 100644
--- a/src/lib/elementary/elc_hoversel.c
+++ b/src/lib/elementary/elc_hoversel.c
@@ -41,6 +41,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
41static Eina_Bool _key_action_move(Evas_Object *obj, const char *params); 41static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
42static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params); 42static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params);
43static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params); 43static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params);
44static Eina_Bool _hoversel_efl_ui_widget_widget_event(Eo *obj, Elm_Hoversel_Data *_pd EINA_UNUSED, const Efl_Event *eo_event, Evas_Object *src EINA_UNUSED);
44 45
45static const Elm_Action key_actions[] = { 46static const Elm_Action key_actions[] = {
46 {"move", _key_action_move}, 47 {"move", _key_action_move},
@@ -438,6 +439,15 @@ _access_state_cb(void *data EINA_UNUSED, Evas_Object *obj)
438 return NULL; 439 return NULL;
439} 440}
440 441
442
443static void
444_hover_key_down(void *data, const Efl_Event *ev)
445{
446 ELM_HOVERSEL_DATA_GET(ev->object, sd);
447
448 _hoversel_efl_ui_widget_widget_event(data, sd, ev, ev->object);
449}
450
441static void 451static void
442_activate(Evas_Object *obj) 452_activate(Evas_Object *obj)
443{ 453{
@@ -459,6 +469,8 @@ _activate(Evas_Object *obj)
459 sd->expanded = EINA_TRUE; 469 sd->expanded = EINA_TRUE;
460 470
461 sd->hover = elm_hover_add(sd->hover_parent); 471 sd->hover = elm_hover_add(sd->hover_parent);
472 efl_event_callback_add(sd->hover, EFL_EVENT_KEY_DOWN, _hover_key_down, obj);
473
462 elm_widget_sub_object_add(obj, sd->hover); 474 elm_widget_sub_object_add(obj, sd->hover);
463 evas_object_layer_set(sd->hover, evas_object_layer_get(sd->hover_parent)); 475 evas_object_layer_set(sd->hover, evas_object_layer_get(sd->hover_parent));
464 476