From b4180e87fa86b9075f8c29b738c7824633b372ee Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 11 Mar 2015 16:00:58 -0400 Subject: [PATCH] fix ibar drop calc to not unexpectedly trigger epileptic seizures in users when attempting to drop on an icon, the drop area geometry was never included in the calc, resulting in the drop changing between positions on every frame --- src/modules/ibar/e_mod_main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c index 9cffe8c01..fddb6e58d 100644 --- a/src/modules/ibar/e_mod_main.c +++ b/src/modules/ibar/e_mod_main.c @@ -1939,8 +1939,18 @@ _ibar_drop_position_update(Instance *inst, Evas_Coord x, Evas_Coord y) inst->ibar->dnd_x = x; inst->ibar->dnd_y = y; - if (inst->ibar->o_drop) e_box_unpack(inst->ibar->o_drop); ic = _ibar_icon_at_coord(inst->ibar, x, y); + if (ic && (ic == inst->ibar->ic_drop_before)) return; + + if (inst->ibar->o_drop) + { + int ox, oy, ow, oh; + + evas_object_geometry_get(inst->ibar->o_drop, &ox, &oy, &ow, &oh); + /* if cursor is still inside last drop area, do nothing */ + if (E_INSIDE(x, y, ox, oy, ow, oh)) return; + e_box_unpack(inst->ibar->o_drop); + } inst->ibar->ic_drop_before = ic; if (ic)