summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-08-26 22:30:02 +0530
committerAmitesh Singh <amitesh.sh@samsung.com>2015-08-28 17:36:21 +0530
commitec672ab1135f154dd61741f0ff29ebe4f51f5d6b (patch)
tree328c689a6cd4d36fcf80265d93202edbae88f511
parenta401b83cad0851dcbc4f32c09d482dae581c6da5 (diff)
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.c6
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)
752 if (!int_ret) return EINA_FALSE; 752 if (!int_ret) return EINA_FALSE;
753 if (!sd->items) return EINA_FALSE; 753 if (!sd->items) return EINA_FALSE;
754 754
755 if (elm_widget_focus_get(obj) && !sd->mouse_down) 755 if (elm_widget_focus_get(obj))
756 { 756 {
757 evas_object_focus_set(wd->resize_obj, EINA_TRUE);
758 if (sd->mouse_down) return EINA_TRUE;
759
757 if (sd->last_focused_item) 760 if (sd->last_focused_item)
758 eo_it = sd->last_focused_item; 761 eo_it = sd->last_focused_item;
759 else if (_elm_config->first_item_focus_on_first_focus_in && 762 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)
767 eo_it = _elm_toolbar_nearest_visible_item_get(obj, eo_it); 770 eo_it = _elm_toolbar_nearest_visible_item_get(obj, eo_it);
768 if (eo_it) _elm_toolbar_item_focused(eo_it); 771 if (eo_it) _elm_toolbar_item_focused(eo_it);
769 } 772 }
770 evas_object_focus_set(wd->resize_obj, EINA_TRUE);
771 } 773 }
772 else 774 else
773 { 775 {