sanghyeonlee pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c5427e875d18bbfd0e10fef48c11e9163651e91c

commit c5427e875d18bbfd0e10fef48c11e9163651e91c
Author: SangHyeon Lee <sh10233....@samsung.com>
Date:   Fri Apr 22 16:08:22 2016 +0900

    genlist : arrange focus set in mouse up
    
    Summary :
    when mouse up happens, item must be focused, and after that,
    select must be called.
    current logic, focus is already called inside the select function
    and again focus set is called in the end of mouse_up,
    so if user new focused widget inside the select callback,
    mouse_up forcely take the focus into the item again.
    select callback should comes after the focus callback calls
    to work properly.
    
    @fix
---
 src/lib/elementary/elm_genlist.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 430c10a..cb77a88 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -4950,6 +4950,9 @@ _item_mouse_up_cb(void *data,
 
    evas_object_ref(sd->obj);
 
+   if (sd->focused_item != EO_OBJ(it))
+     elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);
+
    if (sd->multi &&
        ((sd->multi_select_mode != ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL) ||
         (evas_key_modifier_is_set(ev->modifiers, "Control"))))
@@ -4989,9 +4992,6 @@ _item_mouse_up_cb(void *data,
         if (_item_select(it)) goto deleted;
      }
 
-   if (sd->focused_item != EO_OBJ(it))
-     elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);
-
 deleted:
    evas_object_unref(sd->obj);
 }

-- 


Reply via email to