From: Youngbok Shin Date: Wed, 19 Aug 2015 07:36:41 +0000 (+0900) Subject: toolbar: Fix to give a focus to item in mouse clicked event. X-Git-Tag: accepted/tizen/common/20160826.142851~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F32%2F84432%2F1;p=platform%2Fupstream%2Felementary.git toolbar: Fix to give a focus to item in mouse clicked event. @tizen_fix Change-Id: I58ac6b1eca693b47fe9821420d9d4023128eea72 Signed-off-by: Youngbok Shin --- diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index 486a823..92a999b 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -1883,12 +1883,21 @@ _action_click_cb(void *data, { Elm_Toolbar_Item_Data *it = data; + // TIZEN_ONLY(20150819): Fix to give a focus to item in mouse clicked event. + ELM_TOOLBAR_DATA_GET(WIDGET(it), sd); + // + if ((_elm_config->access_mode == ELM_ACCESS_MODE_OFF) || (_elm_access_2nd_click_timeout(VIEW(it)))) { if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF) _elm_access_say(E_("Selected")); _item_select(it); + // TIZEN_ONLY(20150819): Fix to give a focus to item in mouse clicked event. + if ((!elm_object_item_disabled_get(EO_OBJ(it))) && + (sd->focused_item != EO_OBJ(it))) + elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE); + // } } @@ -2331,9 +2340,10 @@ _mouse_up_cb(Elm_Toolbar_Item_Data *it, if (ev->button != 1) return; sd->mouse_down = EINA_FALSE; ELM_SAFE_FREE(sd->long_timer, ecore_timer_del); - if ((!elm_object_item_disabled_get(EO_OBJ(it))) && - (sd->focused_item != EO_OBJ(it))) - elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE); + // TIZEN_ONLY(20150819): Fix to give a focus to item in mouse clicked event. + //if ((!elm_object_item_disabled_get(EO_OBJ(it))) && + // (sd->focused_item != EO_OBJ(it))) + // elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE); evas_object_event_callback_del_full (VIEW(it), EVAS_CALLBACK_MOUSE_MOVE, (Evas_Object_Event_Cb)_mouse_move_cb, it);