gtk_scrolled_window_start_deceleration (scrolled_window);
priv->x_velocity = priv->y_velocity = 0;
}
+ else
+ {
+ g_clear_pointer (&priv->hscrolling, gtk_kinetic_scrolling_free);
+ g_clear_pointer (&priv->vscrolling, gtk_kinetic_scrolling_free);
+ }
}
static void
gtk_adjustment_set_value (hadjustment, position);
retval = G_SOURCE_CONTINUE;
}
- else if (priv->hscrolling)
- g_clear_pointer (&priv->hscrolling, gtk_kinetic_scrolling_free);
if (priv->vscrolling &&
gtk_kinetic_scrolling_tick (priv->vscrolling, elapsed, &position, NULL))
gtk_adjustment_set_value (vadjustment, position);
retval = G_SOURCE_CONTINUE;
}
- else if (priv->vscrolling)
- g_clear_pointer (&priv->vscrolling, gtk_kinetic_scrolling_free);
if (retval == G_SOURCE_REMOVE)
gtk_scrolled_window_cancel_deceleration (scrolled_window);
GtkAdjustment *hadjustment;
gtk_scrolled_window_accumulate_velocity (&priv->hscrolling, elapsed, &priv->x_velocity);
+ g_clear_pointer (&priv->hscrolling, gtk_kinetic_scrolling_free);
hadjustment = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->hscrollbar));
lower = gtk_adjustment_get_lower (hadjustment);
GtkAdjustment *vadjustment;
gtk_scrolled_window_accumulate_velocity (&priv->vscrolling, elapsed, &priv->y_velocity);
+ g_clear_pointer (&priv->vscrolling, gtk_kinetic_scrolling_free);
vadjustment = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->vscrollbar));
lower = gtk_adjustment_get_lower(vadjustment);