diff options
author | Amitesh Singh <amitesh.sh@samsung.com> | 2015-08-26 22:30:02 +0530 |
---|---|---|
committer | Amitesh Singh <amitesh.sh@samsung.com> | 2015-08-26 22:38:37 +0530 |
commit | 7ff06acf35ebfa275302ee054a0e2ccf1623614b (patch) | |
tree | e59ea2751ceedc6dfdc35bfd420de4dc5c230deb | |
parent | a8afaebf3109f1cb8e397e29ce9dbac599f75c4e (diff) | |
download | elementary-7ff06acf35ebfa275302ee054a0e2ccf1623614b.tar.gz |
toolbar: fix issue of focus not coming to item on mouse click
resize object was not getting focused in case of mouse click.
Steps to reproduce:
1. elementary_test -to "toolbar focus".
2. set focus to toolbar item via mouse.
3. focus does not come to toolbar.
fixes T2697
@fix
-rw-r--r-- | src/lib/elm_toolbar.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index d2797bc88..0061934ac 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -752,8 +752,11 @@ _elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd) if (!int_ret) return EINA_FALSE; if (!sd->items) return EINA_FALSE; - if (elm_widget_focus_get(obj) && !sd->mouse_down) + if (elm_widget_focus_get(obj)) { + evas_object_focus_set(wd->resize_obj, EINA_TRUE); + if (sd->mouse_down) return EINA_TRUE; + if (sd->last_focused_item) eo_it = sd->last_focused_item; else if (_elm_config->first_item_focus_on_first_focus_in && @@ -767,7 +770,6 @@ _elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd) eo_it = _elm_toolbar_nearest_visible_item_get(obj, eo_it); if (eo_it) _elm_toolbar_item_focused(eo_it); } - evas_object_focus_set(wd->resize_obj, EINA_TRUE); } else { |