From fff9407dc82994aebec8becc79528d1719239b0f Mon Sep 17 00:00:00 2001 From: rephorm Date: Wed, 18 Oct 2006 03:00:35 +0000 Subject: [PATCH] its possible for _pos_set() to be called after the final mouse move, but before the mouse up event when dragging a dragable. in this case, the calc immediately after would be incorrect. this fixes the bug noticable in winter sliders being jumpy. (the default theme did not exhibit the bug because the pulsing glow anim cause subsequent recalcs to immediately correct things) SVN revision: 26678 --- legacy/edje/src/lib/edje_calc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/legacy/edje/src/lib/edje_calc.c b/legacy/edje/src/lib/edje_calc.c index 8d77f1b2df..38a1a11393 100644 --- a/legacy/edje/src/lib/edje_calc.c +++ b/legacy/edje/src/lib/edje_calc.c @@ -219,15 +219,19 @@ _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, double x, double y) * value we would set foo to, because it would depend on the * size of the dragable... */ - if (ep->drag.x != x) + if (ep->drag.x != x || ep->drag.tmp.x) { ep->drag.x = x; + ep->drag.tmp.x = 0; + ep->drag.need_reset = 0; ed->dirty = 1; } - if (ep->drag.y != y) + if (ep->drag.y != y || ep->drag.tmp.y) { ep->drag.y = y; + ep->drag.tmp.y = 0; + ep->drag.need_reset = 0; ed->dirty = 1; }