summaryrefslogtreecommitdiff
path: root/src/modules/ibar
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-03-11 16:00:58 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-03-11 16:02:57 -0400
commit868ebe4e318a0bf035e5df4d9765d6acdeb9f150 (patch)
tree746a9ce67ef7d9a19e3fb98fe9b43adb9e833ea5 /src/modules/ibar
parent18c821adc3ade389d013818fd5eadb9abe7fee5e (diff)
downloadenlightenment-868ebe4e318a0bf035e5df4d9765d6acdeb9f150.tar.gz
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
Diffstat (limited to 'src/modules/ibar')
-rw-r--r--src/modules/ibar/e_mod_main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index 31ab39c6f4..31fbb4ec73 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -1948,8 +1948,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) elm_box_unpack(inst->ibar->o_box, 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;
+ elm_box_unpack(inst->ibar->o_box, inst->ibar->o_drop);
+ }
inst->ibar->ic_drop_before = ic;
if (ic)