From 28ba600756251e9e3567eb26a12ca1a0c637e7a0 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 10 Jun 2011 12:16:20 +0000 Subject: [PATCH] less comments and cleaner code with commented out plotting debug SVN revision: 60189 --- legacy/elementary/src/lib/els_scroller.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/legacy/elementary/src/lib/els_scroller.c b/legacy/elementary/src/lib/els_scroller.c index e229d81c44..046e3bdca5 100644 --- a/legacy/elementary/src/lib/els_scroller.c +++ b/legacy/elementary/src/lib/els_scroller.c @@ -1674,24 +1674,22 @@ _smart_hold_animator(void *data) { int i, count = 0; Evas_Coord basex, basey, x, y; - double dt, t, tdiff, tnow; + double dt, t, tdiff, tnow, twin; struct { Evas_Coord x, y, dx, dy; double t, dt; } pos[60]; - // FIXME: assume server and client have the same "timezone" - // (0 timepoint) for now. this needs to be figured out in advance - // though. tdiff = sd->down.hist.est_timestamp_diff; tnow = ecore_time_get() - tdiff; t = tnow; + twin = _elm_config->scroll_smooth_time_window; for (i = 0; i < 60; i++) { // oldest point is sd->down.history[i] // newset is sd->down.history[0] dt = t - sd->down.history[i].timestamp; - if (dt > _elm_config->scroll_smooth_time_window) + if (dt > twin) { i--; break; @@ -1747,6 +1745,7 @@ _smart_hold_animator(void *data) WEIGHT(fx, sd->down.hold_x, _elm_config->scroll_smooth_amount); WEIGHT(fy, sd->down.hold_y, _elm_config->scroll_smooth_amount); } +// printf("%3.5f %i %i\n", ecore_time_get(), sd->down.hold_y, fy); } elm_smart_scroller_child_pos_get(sd->smart_obj, &ox, &oy);