[gtk+] GtkScrolledWindow: reset scroll history if it contained no real history



commit 8e6a68c5fc1d203cdc6a3e2dbf177ce8ef6892ec
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jul 27 20:23:35 2016 +0200

    GtkScrolledWindow: reset scroll history if it contained no real history
    
    Scroll history must refer to a timespan for the values to be valid, otherwise
    we return FALSE, in this case the stored event(s) should be discarded anyway.

 gtk/gtkscrolledwindow.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 17f25e0..0a7a52f 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1347,7 +1347,10 @@ scroll_history_finish (GtkScrolledWindow *sw,
     }
 
   if (last == first)
-    return FALSE;
+    {
+      scroll_history_reset (sw);
+      return FALSE;
+    }
 
   xunit = get_scroll_unit (sw, GTK_ORIENTATION_HORIZONTAL);
   yunit = get_scroll_unit (sw, GTK_ORIENTATION_VERTICAL);


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