[gtk/wip/carlosg/fix-accumulated-velocity: 46/50] gtkkineticscroll: Do not reset velocity after stop()




commit fe2ab84a2c735c76e5ebd02739fb9dd0d3586b18
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Mar 15 21:52:35 2022 +0100

    gtkkineticscroll: Do not reset velocity after stop()
    
    We may want to fetch the last velocity obtained, even though we
    preemptively called stop() on a kinetic scroll helper. Keep this
    velocity so it can be queried later on.

 gtk/gtkkineticscrolling.c | 1 -
 1 file changed, 1 deletion(-)
---
diff --git a/gtk/gtkkineticscrolling.c b/gtk/gtkkineticscrolling.c
index 4eab5dcc84..8c697d54cd 100644
--- a/gtk/gtkkineticscrolling.c
+++ b/gtk/gtkkineticscrolling.c
@@ -254,6 +254,5 @@ gtk_kinetic_scrolling_stop (GtkKineticScrolling *data)
     {
       data->phase = GTK_KINETIC_SCROLLING_PHASE_FINISHED;
       data->position = round (data->position);
-      data->velocity = 0;
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]