summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2017-10-20 17:21:19 +0200
committerMarcel Hollerbach <marcel@osg.samsung.com>2017-10-20 17:21:57 +0200
commit613649a39fe1481af494f33542c020b0b632183a (patch)
treeaef01a5151d79140eb4e2fd61cd59d68e6859947
parentf79b1b9826fc9361c34615296165fd8aba1c97e5 (diff)
elm_gengrid: add pseudo widget into the item if there are no focusable
widgets
-rw-r--r--src/lib/elementary/elm_gengrid.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index a2cdc83c30..addcbeaf0d 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -14,6 +14,7 @@
14#include "elm_widget_gengrid.h" 14#include "elm_widget_gengrid.h"
15#include "elm_interface_scrollable.h" 15#include "elm_interface_scrollable.h"
16#include "efl_ui_focus_parent_provider_gen.eo.h" 16#include "efl_ui_focus_parent_provider_gen.eo.h"
17#include "efl_ui_focus_composition_adapter.eo.h"
17 18
18#define MY_PAN_CLASS ELM_GENGRID_PAN_CLASS 19#define MY_PAN_CLASS ELM_GENGRID_PAN_CLASS
19 20
@@ -4234,7 +4235,13 @@ static void
4234_gengrid_element_focused(void *data, const Efl_Event *ev) 4235_gengrid_element_focused(void *data, const Efl_Event *ev)
4235{ 4236{
4236 ELM_GENGRID_DATA_GET(data, pd); 4237 ELM_GENGRID_DATA_GET(data, pd);
4237 Elm_Widget_Item *item = efl_ui_focus_parent_provider_find_logical_parent(pd->provider, ev->info); 4238 Elm_Widget_Item *item;
4239
4240 if (efl_isa(ev->info, EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS))
4241 item = efl_parent_get(ev->info);
4242 else
4243 item = efl_ui_focus_parent_provider_find_logical_parent(pd->provider, ev->info);
4244
4238 if (efl_isa(item, ELM_GENGRID_ITEM_CLASS)) 4245 if (efl_isa(item, ELM_GENGRID_ITEM_CLASS))
4239 { 4246 {
4240 _elm_gengrid_item_focused(item); 4247 _elm_gengrid_item_focused(item);
@@ -5733,6 +5740,13 @@ _elm_gengrid_item_efl_ui_focus_object_prepare_logical(Eo *obj, Elm_Gen_Item *pd)
5733{ 5740{
5734 efl_ui_focus_object_prepare_logical(efl_super(obj, ELM_GENGRID_ITEM_CLASS)); 5741 efl_ui_focus_object_prepare_logical(efl_super(obj, ELM_GENGRID_ITEM_CLASS));
5735 _item_realize(pd); 5742 _item_realize(pd);
5743
5744 if (!efl_ui_focus_manager_request_subchild(WIDGET(pd), obj))
5745 {
5746 Eo *adapter = efl_add(EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS, VIEW(pd) , efl_ui_focus_composition_adapter_canvas_object_set(efl_added, VIEW(pd)));
5747
5748 efl_ui_focus_manager_calc_register(WIDGET(pd), adapter, obj, NULL);
5749 }
5736} 5750}
5737 5751
5738 5752