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.
This commit is contained in:
parent
8fa5dad5f9
commit
32cd38f89d
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue