summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-05-29 09:18:01 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-29 12:29:03 -0400
commit2e8f714979e1cc4b41cd92ce816c8926a5a223f0 (patch)
treee54819698db3849f372202030eca30ecef3e2c92
parentda877d9e638616555915e1c7648040747f395428 (diff)
elm/gengrid: handle focus events when no previous focus item was set
Summary: this triggers fewer error messages @fix Depends on D8962 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8963
-rw-r--r--src/lib/elementary/elm_gengrid.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index eb9248abaf..fb9c64a7e0 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -4340,8 +4340,11 @@ _gengrid_element_focused(void *data, const Efl_Event *ev)
4340 Efl_Ui_Widget *focused = efl_ui_focus_manager_focus_get(ev->object); 4340 Efl_Ui_Widget *focused = efl_ui_focus_manager_focus_get(ev->object);
4341 Elm_Widget_Item *item = NULL, *old_item = NULL; 4341 Elm_Widget_Item *item = NULL, *old_item = NULL;
4342 4342
4343 item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, focused); 4343 /* there may be no focus during widget setup */
4344 old_item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, ev->info); 4344 if (focused)
4345 item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, focused);
4346 if (ev->info)
4347 old_item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, ev->info);
4345 4348
4346 if (old_item) 4349 if (old_item)
4347 { 4350 {