summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchinmaya <chinmaya@chinmaya-VirtualBox.(none)>2014-05-26 15:45:54 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-05-26 15:45:54 +0900
commita420f494dc2bb420f0c6851002f3b8e704abd330 (patch)
treead7685a765a16dd024780dc3a04e17b05c0e98d1
parent468b4cfeced34776db3d082b07b64f94040592b3 (diff)
Genlist: Focus does not move, if it is set on item content objects.
Summary: If focus is set on item content object, it's treated as a different object which results the focus deadlock. So, every time whenever focus sets on item content object, we need to unset and set the focus on genlist object. Thanks to Seoz for the idea. Test Plan: elementary_test -to "genlist focus" Reviewers: seoz, SanghyeonLee, eagleeye CC: seoz Differential Revision: https://phab.enlightenment.org/D891
-rw-r--r--src/lib/elm_genlist.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 640b618fd..67f3749ae 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -5507,6 +5507,21 @@ _item_select(Elm_Gen_Item *it)
5507 else 5507 else
5508 sd->last_selected_item = (Elm_Object_Item *)it; 5508 sd->last_selected_item = (Elm_Object_Item *)it;
5509 } 5509 }
5510
5511 if (!(sd->focus_on_selection_enabled || _elm_config->item_select_on_focus_disable))
5512 {
5513 Evas_Object *swallow_obj;
5514 Eina_List *l;
5515 EINA_LIST_FOREACH(it->content_objs, l, swallow_obj)
5516 {
5517 if (elm_object_focus_get(swallow_obj))
5518 {
5519 elm_object_focus_set( obj, EINA_FALSE);
5520 elm_object_focus_set( obj, EINA_TRUE);
5521 break;
5522 }
5523 }
5524 }
5510 evas_object_unref(obj); 5525 evas_object_unref(obj);
5511} 5526}
5512 5527