summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-01-24 16:11:13 +0100
committerDave Andreoli <dave@gurumeditation.it>2016-01-24 16:11:13 +0100
commit359bec5756d38a14158e6b2c64f86aaba2cfcd28 (patch)
treea783cc67e2ac89dea53212d91cde8fb819e610a8
parent15e9f8071da393aee4bd83313a73f0fff3ff7eab (diff)
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
-rw-r--r--src/lib/elm_gengrid.c2
-rw-r--r--src/lib/elm_genlist.c2
-rw-r--r--src/lib/elm_widget.c6
3 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 02b1294e3..81b1ce503 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -1099,7 +1099,7 @@ _item_mouse_up_cb(void *data,
1099 return; 1099 return;
1100 } 1100 }
1101 1101
1102 if (sd->focused_item != eo_it) 1102 if ((ev->flags == EVAS_BUTTON_NONE) && (sd->focused_item != eo_it))
1103 elm_object_item_focus_set(eo_it, EINA_TRUE); 1103 elm_object_item_focus_set(eo_it, EINA_TRUE);
1104 1104
1105 if (sd->multi && 1105 if (sd->multi &&
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index de720cf1b..572e734c5 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -4928,7 +4928,7 @@ _item_mouse_up_cb(void *data,
4928 if (_item_select(it)) goto deleted; 4928 if (_item_select(it)) goto deleted;
4929 } 4929 }
4930 4930
4931 if (sd->focused_item != EO_OBJ(it)) 4931 if ((ev->flags == EVAS_BUTTON_NONE) && (sd->focused_item != EO_OBJ(it)))
4932 elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE); 4932 elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);
4933 4933
4934deleted: 4934deleted:
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index b779994dd..efcbc88a7 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -331,10 +331,12 @@ static void
331_obj_mouse_up(void *data, 331_obj_mouse_up(void *data,
332 Evas *e EINA_UNUSED, 332 Evas *e EINA_UNUSED,
333 Evas_Object *obj, 333 Evas_Object *obj,
334 void *event_info EINA_UNUSED) 334 void *event_info)
335{ 335{
336 ELM_WIDGET_DATA_GET(data, sd); 336 ELM_WIDGET_DATA_GET(data, sd);
337 if (sd->still_in && 337 Evas_Event_Mouse_Up *ev = event_info;
338
339 if (sd->still_in && (ev->flags == EVAS_BUTTON_NONE) &&
338 (sd->focus_move_policy == ELM_FOCUS_MOVE_POLICY_CLICK)) 340 (sd->focus_move_policy == ELM_FOCUS_MOVE_POLICY_CLICK))
339 elm_widget_focus_mouse_up_handle(obj); 341 elm_widget_focus_mouse_up_handle(obj);
340 342