summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2017-11-12 12:02:17 +0100
committerMarcel Hollerbach <marcel@osg.samsung.com>2017-11-12 12:05:31 +0100
commita2a0ccf36b5becdd00005f339e03bb19154f8fdc (patch)
tree5063b5de0976e8e4e6a7a34ba0a66d51727c4829 /src
parentb364293b0c2238c74a8450c4d27787ebe027b483 (diff)
elm_widget_item_static_focus: do not accept the adapter as subchild
The problem here was that the adapter we have created would be recognized as our subchild, and thus we delete our own subchild, which is wrong. This fixes that problem and keeps the adapter alive.
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/elm_widget_item_static_focus.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_widget_item_static_focus.c b/src/lib/elementary/elm_widget_item_static_focus.c
index 905bc264ec..8c56e0e154 100644
--- a/src/lib/elementary/elm_widget_item_static_focus.c
+++ b/src/lib/elementary/elm_widget_item_static_focus.c
@@ -15,11 +15,14 @@ typedef struct {
15EOLIAN static void 15EOLIAN static void
16_elm_widget_item_static_focus_efl_ui_focus_object_prepare_logical(Eo *obj, Elm_Widget_Item_Static_Focus_Data *pd EINA_UNUSED) 16_elm_widget_item_static_focus_efl_ui_focus_object_prepare_logical(Eo *obj, Elm_Widget_Item_Static_Focus_Data *pd EINA_UNUSED)
17{ 17{
18 Eo *logical_child;
18 Elm_Widget_Item_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS); 19 Elm_Widget_Item_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS);
19 20
20 efl_ui_focus_object_prepare_logical(efl_super(obj, ELM_WIDGET_ITEM_STATIC_FOCUS_CLASS)); 21 efl_ui_focus_object_prepare_logical(efl_super(obj, ELM_WIDGET_ITEM_STATIC_FOCUS_CLASS));
22 logical_child = efl_ui_focus_manager_request_subchild(wpd->widget, obj);
21 23
22 if (!efl_ui_focus_manager_request_subchild(wpd->widget, obj)) 24
25 if (!logical_child)
23 { 26 {
24 if (!pd->adapter) 27 if (!pd->adapter)
25 { 28 {
@@ -28,7 +31,7 @@ _elm_widget_item_static_focus_efl_ui_focus_object_prepare_logical(Eo *obj, Elm_W
28 efl_ui_focus_manager_calc_register(wpd->widget, pd->adapter, obj, NULL); 31 efl_ui_focus_manager_calc_register(wpd->widget, pd->adapter, obj, NULL);
29 } 32 }
30 } 33 }
31 else if (pd->adapter) 34 else if (logical_child && logical_child != pd->adapter)
32 { 35 {
33 efl_ui_focus_manager_calc_unregister(wpd->widget, pd->adapter); 36 efl_ui_focus_manager_calc_unregister(wpd->widget, pd->adapter);
34 efl_del(pd->adapter); 37 efl_del(pd->adapter);