Unset the scroll_to attribute to stop the panning timeout properly.
authorAlejandro G. Castro <alex@igalia.com>
Tue, 22 Sep 2009 17:49:52 +0000 (19:49 +0200)
committerAlejandro G. Castro <alex@igalia.com>
Wed, 23 Sep 2009 07:55:10 +0000 (09:55 +0200)
* hildon/hildon-pannable-area.c,
(hildon_pannable_axis_scroll),
(hildon_pannable_area_scroll): Unset the scroll_to in some
situations, it was causing the timeout did not stop in some cases.

Fixes: NB#140186 (HildonPannableArea goes into an infinite loop)

ChangeLog
hildon/hildon-pannable-area.c

index 5945fe2..aeb0cdc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-09-22  Alejandro G. Castro  <alex@igalia.com>
+
+       * hildon/hildon-pannable-area.c,
+       (hildon_pannable_axis_scroll),
+       (hildon_pannable_area_scroll): Unset the scroll_to in some
+       situations, it was causing the timeout did not stop in some cases.
+
+       Fixes: NB#140186 (HildonPannableArea goes into an infinite loop)
+
 2009-07-02  David King  <davidk@openismus.com>
 
        * hildon/hildon-animation-actor-private.h
index 1c42f02..c05edb0 100644 (file)
@@ -2160,6 +2160,7 @@ hildon_pannable_axis_scroll (HildonPannableArea *area,
         gtk_widget_queue_resize (GTK_WIDGET (area));
       } else {
         *vel = 0.0;
+        *scroll_to = -1;
       }
     } else if (dist > adjust->upper - adjust->page_size) {
       if (s) *s = FALSE;
@@ -2174,6 +2175,7 @@ hildon_pannable_axis_scroll (HildonPannableArea *area,
         gtk_widget_queue_resize (GTK_WIDGET (area));
       } else {
         *vel = 0.0;
+        *scroll_to = -1;
       }
     } else {
       if ((*scroll_to) != -1) {
@@ -2284,7 +2286,8 @@ hildon_pannable_area_scroll (HildonPannableArea *area,
                                  &priv->overshooting_y, &priv->overshot_dist_y,
                                  &priv->scroll_to_y, priv->vovershoot_max, &sy);
   } else {
-    priv->vel_y = 0;
+    priv->vel_y = 0.0;
+    priv->scroll_to_y = -1;
   }
 
   if (hscroll_visible) {
@@ -2292,7 +2295,8 @@ hildon_pannable_area_scroll (HildonPannableArea *area,
                                  &priv->overshooting_x, &priv->overshot_dist_x,
                                  &priv->scroll_to_x, priv->hovershoot_max, &sx);
   } else {
-    priv->vel_x = 0;
+    priv->vel_x = 0.0;
+    priv->scroll_to_x = -1;
   }
 
   if (hv != priv->hadjust->value)