forked from enlightenment/terminology
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:
parent
be8c20ab26
commit
f7cd970c19
|
@ -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);
|
Sel *sd = evas_object_smart_data_get(data);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
|
|
||||||
|
if (sd->exit_on_sel) return;
|
||||||
if (sd->down.down) return;
|
if (sd->down.down) return;
|
||||||
if (ev->button != 1) return;
|
if (ev->button != 1) return;
|
||||||
sd->down.x = ev->canvas.x;
|
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;
|
Evas_Coord dx, dy;
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
|
|
||||||
|
if (sd->exit_on_sel) return;
|
||||||
if (!sd->down.down) return;
|
if (!sd->down.down) return;
|
||||||
sd->down.down = EINA_FALSE;
|
sd->down.down = EINA_FALSE;
|
||||||
dx = abs(ev->canvas.x - sd->down.x);
|
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;
|
Evas_Coord x = 0, y = 0, w = 0, h = 0, sw, sh;
|
||||||
int iw, ih;
|
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));
|
iw = sqrt(eina_list_count(sd->items));
|
||||||
if (iw < 1) iw = 1;
|
if (iw < 1) iw = 1;
|
||||||
ih = (eina_list_count(sd->items) + (iw - 1)) / iw;
|
ih = (eina_list_count(sd->items) + (iw - 1)) / iw;
|
||||||
|
|
Loading…
Reference in New Issue