forked from AuroraMiddleware/gtk
scrolledwindow: Cancel kinetic/overshoot animation on captured scroll events
This ensures the animation is cancelled if the child widget happens to GDK_EVENT_STOP scroll events. https://bugzilla.gnome.org/show_bug.cgi?id=745315
This commit is contained in:
parent
da679f3866
commit
3ccfcf5b9f
@ -1071,6 +1071,12 @@ captured_event_cb (GtkWidget *widget,
|
||||
sw = GTK_SCROLLED_WINDOW (widget);
|
||||
priv = sw->priv;
|
||||
|
||||
if (event->type == GDK_SCROLL)
|
||||
{
|
||||
gtk_scrolled_window_cancel_deceleration (sw);
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
if (!priv->use_indicators)
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
|
||||
@ -2993,7 +2999,6 @@ gtk_scrolled_window_scroll_event (GtkWidget *widget,
|
||||
|
||||
if (handled)
|
||||
{
|
||||
gtk_scrolled_window_cancel_deceleration (scrolled_window);
|
||||
gtk_scrolled_window_invalidate_overshoot (scrolled_window);
|
||||
|
||||
if (priv->scroll_events_overshoot_id)
|
||||
|
Loading…
Reference in New Issue
Block a user