summaryrefslogtreecommitdiff
path: root/legacy/elementary
diff options
context:
space:
mode:
authorJaehwan Kim <jae.hwan.kim.neo@gmail.com>2012-03-26 10:05:26 +0000
committerJaehwan Kim <jae.hwan.kim.neo@gmail.com>2012-03-26 10:05:26 +0000
commit6b5589687fcd2e743e3ec6d3930d1aa11d1ed533 (patch)
tree53603e1ef0b13769b82f596e6b457a733393890e /legacy/elementary
parent5d4a35e1176e7a3fd2b049aacb635b94f433fab2 (diff)
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
Diffstat (limited to 'legacy/elementary')
-rw-r--r--legacy/elementary/src/lib/els_scroller.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/legacy/elementary/src/lib/els_scroller.c b/legacy/elementary/src/lib/els_scroller.c
index 08ba71a8aa..bb26075905 100644
--- a/legacy/elementary/src/lib/els_scroller.c
+++ b/legacy/elementary/src/lib/els_scroller.c
@@ -70,6 +70,7 @@ struct _Smart_Data
70 Eina_Bool bounce_x_hold : 1; 70 Eina_Bool bounce_x_hold : 1;
71 Eina_Bool bounce_y_hold : 1; 71 Eina_Bool bounce_y_hold : 1;
72 Eina_Bool scroll : 1; 72 Eina_Bool scroll : 1;
73 Eina_Bool want_reset : 1;
73 } down; 74 } down;
74 75
75 struct { 76 struct {
@@ -1774,6 +1775,10 @@ _smart_event_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
1774 sd->down.dragged_began = EINA_FALSE; 1775 sd->down.dragged_began = EINA_FALSE;
1775 sd->down.hold_parent = EINA_FALSE; 1776 sd->down.hold_parent = EINA_FALSE;
1776 sd->down.cancelled = EINA_FALSE; 1777 sd->down.cancelled = EINA_FALSE;
1778 if(sd->hold || sd->freeze)
1779 sd->down.want_reset = EINA_TRUE;
1780 else
1781 sd->down.want_reset = EINA_FALSE;
1777 } 1782 }
1778} 1783}
1779 1784
@@ -2392,6 +2397,12 @@ _smart_event_mouse_move(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *
2392 y = sd->down.sy - (ev->cur.canvas.y - sd->down.y); 2397 y = sd->down.sy - (ev->cur.canvas.y - sd->down.y);
2393 else 2398 else
2394 y = sd->down.sy; 2399 y = sd->down.sy;
2400 if(sd->down.want_reset)
2401 {
2402 sd->down.x = ev->cur.canvas.x;
2403 sd->down.y = ev->cur.canvas.y;
2404 sd->down.want_reset = EINA_FALSE;
2405 }
2395 if ((sd->down.dir_x) || (sd->down.dir_y)) 2406 if ((sd->down.dir_x) || (sd->down.dir_y))
2396 { 2407 {
2397 if (!sd->down.locked) 2408 if (!sd->down.locked)