Genlist/grid: do not set again the focus on double/triple click

Focus is already setted on first mouse-up, no need to set again in double and triple click up events

@Fix the issue reported in previous commits
This commit is contained in:
Davide Andreoli 2016-01-24 16:11:13 +01:00
parent 047e9c35f7
commit 913c9f3c6c
3 changed files with 6 additions and 4 deletions

View File

@ -1099,7 +1099,7 @@ _item_mouse_up_cb(void *data,
return;
}
if (sd->focused_item != eo_it)
if ((ev->flags == EVAS_BUTTON_NONE) && (sd->focused_item != eo_it))
elm_object_item_focus_set(eo_it, EINA_TRUE);
if (sd->multi &&

View File

@ -4928,7 +4928,7 @@ _item_mouse_up_cb(void *data,
if (_item_select(it)) goto deleted;
}
if (sd->focused_item != EO_OBJ(it))
if ((ev->flags == EVAS_BUTTON_NONE) && (sd->focused_item != EO_OBJ(it)))
elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);
deleted:

View File

@ -331,10 +331,12 @@ static void
_obj_mouse_up(void *data,
Evas *e EINA_UNUSED,
Evas_Object *obj,
void *event_info EINA_UNUSED)
void *event_info)
{
ELM_WIDGET_DATA_GET(data, sd);
if (sd->still_in &&
Evas_Event_Mouse_Up *ev = event_info;
if (sd->still_in && (ev->flags == EVAS_BUTTON_NONE) &&
(sd->focus_move_policy == ELM_FOCUS_MOVE_POLICY_CLICK))
elm_widget_focus_mouse_up_handle(obj);