[gtk+/gestures: 50/92] scrolledwindow: Fix overshoot coordinates



commit 6ab18ecf1801f4df0c4db7f6a3e30e95526004a8
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Mar 26 10:53:42 2014 +0100

    scrolledwindow: Fix overshoot coordinates
    
    With gtk_gesture_get_point() returning events in
    gtk_event_controller_get_widget() coordinates, we no longer need
    to compensate for the overshoot here.

 gtk/gtkscrolledwindow.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 233a0ef..a935885 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -617,7 +617,7 @@ scrolled_window_drag_update_cb (GtkScrolledWindow *scrolled_window,
   hadjustment = gtk_range_get_adjustment (GTK_RANGE (priv->hscrollbar));
   if (hadjustment && priv->hscrollbar_visible)
     {
-      dx = priv->drag_start_x - offset_x + old_overshoot_x;
+      dx = priv->drag_start_x - offset_x;
       _gtk_scrolled_window_set_adjustment_value (scrolled_window, hadjustment,
                                                  dx, TRUE, FALSE);
     }
@@ -625,7 +625,7 @@ scrolled_window_drag_update_cb (GtkScrolledWindow *scrolled_window,
   vadjustment = gtk_range_get_adjustment (GTK_RANGE (priv->vscrollbar));
   if (vadjustment && priv->vscrollbar_visible)
     {
-      dy = priv->drag_start_y - offset_y + old_overshoot_y;
+      dy = priv->drag_start_y - offset_y;
       _gtk_scrolled_window_set_adjustment_value (scrolled_window, vadjustment,
                                                  dy, TRUE, FALSE);
     }


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