From a0bb5e181c480bb0c8c64dcc3c54f6814816c2ad Mon Sep 17 00:00:00 2001 From: "Alejandro G. Castro" Date: Tue, 22 Sep 2009 19:49:52 +0200 Subject: [PATCH] Unset the scroll_to attribute to stop the panning timeout properly. * 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 | 9 +++++++++ hildon/hildon-pannable-area.c | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5945fe2..aeb0cdc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-09-22 Alejandro G. Castro + + * 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 * hildon/hildon-animation-actor-private.h diff --git a/hildon/hildon-pannable-area.c b/hildon/hildon-pannable-area.c index 1c42f02..c05edb0 100644 --- a/hildon/hildon-pannable-area.c +++ b/hildon/hildon-pannable-area.c @@ -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) -- 1.7.9.5