From 700341792b3d6c1a76778a485c05093d30e36b30 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Sun, 23 Mar 2014 21:32:05 +0900 Subject: [PATCH] genlist: Fixed focus object hidden bug on re-focus. On smart_on_focus, genlist calls elm_object_item_focus_set. That API internally calls _elm_widget_focus_highlight_start() but we need to call this function once again because of the weird focus behavior. Condition: enable focus highlight and focus highlight animation. The first _elm_widget_focus_highlight_start() triggers _elm_win_focus_highlight_simple_setup, and second call triggers _elm_win_focus_highlight_anim_setup. But the first call does not show the focus highlight object properly. Reproduction scenario: 1. elementary_test -> genlist focus 2. click an item 3. scroll the genlist and move the focused item away from the viewport. 4. move the mouse pointer to another window 5. move the mouse pointer to the genlist window back again. 6. focus highlight object is now shown correctly. By the way, this bug will be hidden when the focus highlight never scrolls away. I will add this feature soon. --- src/lib/elm_genlist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 0490412..4158f59 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -2897,6 +2897,7 @@ _elm_genlist_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list) elm_genlist_item_selected_set(it, EINA_TRUE); else elm_object_item_focus_set(it, EINA_TRUE); + _elm_widget_focus_highlight_start(obj); } } } -- 2.7.4