fix sel to not respond to mouse events when exit_on_sel is set

this should actually fix T618 without animation breakages
This commit is contained in:
Carsten Haitzler 2014-06-09 08:12:41 +09:00
parent be8c20ab26
commit f7cd970c19
1 changed files with 8 additions and 5 deletions

View File

@ -61,6 +61,7 @@ _mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
Sel *sd = evas_object_smart_data_get(data);
if (!sd) return;
if (sd->exit_on_sel) return;
if (sd->down.down) return;
if (ev->button != 1) return;
sd->down.x = ev->canvas.x;
@ -76,6 +77,7 @@ _mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
Evas_Coord dx, dy;
if (!sd) return;
if (sd->exit_on_sel) return;
if (!sd->down.down) return;
sd->down.down = EINA_FALSE;
dx = abs(ev->canvas.x - sd->down.x);
@ -120,7 +122,8 @@ _mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
Evas_Coord x = 0, y = 0, w = 0, h = 0, sw, sh;
int iw, ih;
if ((sd->exit_me) || (sd->exit_now) || (sd->select_me)) return;
if ((sd->exit_me) || (sd->exit_now) || (sd->select_me) || (sd->exit_on_sel))
return;
iw = sqrt(eina_list_count(sd->items));
if (iw < 1) iw = 1;
ih = (eina_list_count(sd->items) + (iw - 1)) / iw;