summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-06-24 11:56:52 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-06-24 11:56:52 +0900
commitba8a47a316cf8473b16e3f2848f48e574fd7222f (patch)
treec6656d5093e0b384f43cb859f45f00610ce7347b
parent7bf845b24ca7bd12273f5207022e1e5db4ad2e78 (diff)
elm focus - fix focus composition prepare to not seg by unsafe list mods
efl_ui_focus_composition_prepare() methods in 2 widgets were modifying the list (removing items) as they walked, using unsafe walking macros. fix - use the safe variants.
-rw-r--r--src/lib/elementary/elm_grid.c4
-rw-r--r--src/lib/elementary/elm_table.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/elementary/elm_grid.c b/src/lib/elementary/elm_grid.c
index f1d5cd04d5..7443047912 100644
--- a/src/lib/elementary/elm_grid.c
+++ b/src/lib/elementary/elm_grid.c
@@ -17,13 +17,13 @@
17static void 17static void
18_elm_grid_efl_ui_focus_composition_prepare(Eo *obj, void *pd EINA_UNUSED) 18_elm_grid_efl_ui_focus_composition_prepare(Eo *obj, void *pd EINA_UNUSED)
19{ 19{
20 Eina_List *l; 20 Eina_List *l, *ll;
21 Efl_Ui_Widget *elem; 21 Efl_Ui_Widget *elem;
22 22
23 Elm_Widget_Smart_Data *wpd = efl_data_scope_get(obj, EFL_UI_WIDGET_CLASS); 23 Elm_Widget_Smart_Data *wpd = efl_data_scope_get(obj, EFL_UI_WIDGET_CLASS);
24 Eina_List *order = evas_object_grid_children_get(wpd->resize_obj); 24 Eina_List *order = evas_object_grid_children_get(wpd->resize_obj);
25 25
26 EINA_LIST_FOREACH(order, l, elem) 26 EINA_LIST_FOREACH_SAFE(order, l, ll, elem)
27 { 27 {
28 if (!efl_isa(elem, EFL_UI_WIDGET_CLASS)) 28 if (!efl_isa(elem, EFL_UI_WIDGET_CLASS))
29 order = eina_list_remove(order, elem); 29 order = eina_list_remove(order, elem);
diff --git a/src/lib/elementary/elm_table.c b/src/lib/elementary/elm_table.c
index dfe7cf2bb7..5cab078534 100644
--- a/src/lib/elementary/elm_table.c
+++ b/src/lib/elementary/elm_table.c
@@ -18,13 +18,13 @@
18static void 18static void
19_elm_table_efl_ui_focus_composition_prepare(Eo *obj, void *pd EINA_UNUSED) 19_elm_table_efl_ui_focus_composition_prepare(Eo *obj, void *pd EINA_UNUSED)
20{ 20{
21 Eina_List *l; 21 Eina_List *l, *ll;
22 Efl_Ui_Widget *elem; 22 Efl_Ui_Widget *elem;
23 23
24 Elm_Widget_Smart_Data *wpd = efl_data_scope_get(obj, EFL_UI_WIDGET_CLASS); 24 Elm_Widget_Smart_Data *wpd = efl_data_scope_get(obj, EFL_UI_WIDGET_CLASS);
25 Eina_List *order = evas_object_table_children_get(wpd->resize_obj); 25 Eina_List *order = evas_object_table_children_get(wpd->resize_obj);
26 26
27 EINA_LIST_FOREACH(order, l, elem) 27 EINA_LIST_FOREACH_SAFE(order, l, ll, elem)
28 { 28 {
29 if (!efl_isa(elem, EFL_UI_WIDGET_CLASS)) 29 if (!efl_isa(elem, EFL_UI_WIDGET_CLASS))
30 order = eina_list_remove(order, elem); 30 order = eina_list_remove(order, elem);