Fixed problem with the timeout deceleration in pannable.
authorAlejandro G. Castro <alex@igalia.com>
Tue, 8 Sep 2009 08:03:03 +0000 (10:03 +0200)
committerAlejandro G. Castro <alex@igalia.com>
Tue, 8 Sep 2009 08:03:03 +0000 (10:03 +0200)
* hildon/hildon-pannable-area.c,
(hildon_pannable_area_timeout): Fixed problem with the timeout
function, we need to move before decelerating the first time or we
are loosing the first jump.

Fixes: NB#137604 (Pannable scroll_to does not move correctly)

ChangeLog
hildon/hildon-pannable-area.c

index ba70b4e..11a9ccc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-09-08  Alejandro G. Castro  <alex@igalia.com>
+
+       * hildon/hildon-pannable-area.c,
+       (hildon_pannable_area_timeout): Fixed problem with the timeout
+       function, we need to move before decelerating the first time or we
+       are loosing the first jump.
+
+       Fixes: NB#137604 (Pannable scroll_to does not move correctly)
+
 2009-09-07  Claudio Saavedra  <csaavedra@igalia.com>
 
        [2.2.0 Release Candidate 3]
index 3cea45b..436fdb8 100644 (file)
@@ -2314,6 +2314,10 @@ hildon_pannable_area_timeout (HildonPannableArea * area)
     return FALSE;
   }
 
+  hildon_pannable_area_scroll (area, priv->vel_x, priv->vel_y);
+
+  gdk_window_process_updates (GTK_WIDGET (area)->window, FALSE);
+
   if (!priv->button_pressed) {
     /* Decelerate gradually when pointer is raised */
     if ((!priv->overshot_dist_y) &&
@@ -2358,10 +2362,6 @@ hildon_pannable_area_timeout (HildonPannableArea * area)
     return FALSE;
   }
 
-  hildon_pannable_area_scroll (area, priv->vel_x, priv->vel_y);
-
-  gdk_window_process_updates (GTK_WIDGET (area)->window, FALSE);
-
   return TRUE;
 }
 
@@ -3059,7 +3059,7 @@ hildon_pannable_calculate_vel_factor (HildonPannableArea * self)
     fct += fct_i;
   }
 
-    priv->vel_factor = fct;
+  priv->vel_factor = fct;
 }
 
 /**