When the scroller is holded and scrolled, it can be jump.

The squence is hold push -> mouse down -> mouse move -> hold pop -> mouse move continuously.
After upper sequence, the scroller will jump. So I fixed this issue.


SVN revision: 69631
This commit is contained in:
Jaehwan Kim 2012-03-26 10:05:26 +00:00
parent 5d4a35e117
commit 6b5589687f
1 changed files with 11 additions and 0 deletions

View File

@ -70,6 +70,7 @@ struct _Smart_Data
Eina_Bool bounce_x_hold : 1;
Eina_Bool bounce_y_hold : 1;
Eina_Bool scroll : 1;
Eina_Bool want_reset : 1;
} down;
struct {
@ -1774,6 +1775,10 @@ _smart_event_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
sd->down.dragged_began = EINA_FALSE;
sd->down.hold_parent = EINA_FALSE;
sd->down.cancelled = EINA_FALSE;
if(sd->hold || sd->freeze)
sd->down.want_reset = EINA_TRUE;
else
sd->down.want_reset = EINA_FALSE;
}
}
@ -2392,6 +2397,12 @@ _smart_event_mouse_move(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *
y = sd->down.sy - (ev->cur.canvas.y - sd->down.y);
else
y = sd->down.sy;
if(sd->down.want_reset)
{
sd->down.x = ev->cur.canvas.x;
sd->down.y = ev->cur.canvas.y;
sd->down.want_reset = EINA_FALSE;
}
if ((sd->down.dir_x) || (sd->down.dir_y))
{
if (!sd->down.locked)