[gtk+] scrolledwindow: fix scrolling with shared adjustment



commit f0478c3dfdb14c7ad474ed1d2ac989f8e4ecf3c8
Author: Stefan Sauer <ensonic users sf net>
Date:   Sun May 25 21:35:14 2014 +0200

    scrolledwindow: fix scrolling with shared adjustment
    
    The GtkPolicyType set on the scrollbar is just about the presentation. What
    matters for scrolling is the adjustment.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730730

 gtk/gtkscrolledwindow.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index f9d9e29..ef92aaa 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -2349,8 +2349,7 @@ gtk_scrolled_window_scroll_event (GtkWidget      *widget,
 
   if (gdk_event_get_scroll_deltas ((GdkEvent *) event, &delta_x, &delta_y))
     {
-      if (delta_x != 0.0 &&
-          gtk_widget_get_visible (priv->hscrollbar))
+      if (delta_x != 0.0)
         {
           GtkAdjustment *adj;
           gdouble new_value;
@@ -2371,8 +2370,7 @@ gtk_scrolled_window_scroll_event (GtkWidget      *widget,
           handled = TRUE;
         }
 
-      if (delta_y != 0.0 &&
-          gtk_widget_get_visible (priv->vscrollbar))
+      if (delta_y != 0.0)
         {
           GtkAdjustment *adj;
           gdouble new_value;
@@ -2402,7 +2400,7 @@ gtk_scrolled_window_scroll_event (GtkWidget      *widget,
       else
         range = priv->hscrollbar;
 
-      if (range && gtk_widget_get_visible (range))
+      if (range)
         {
           GtkAdjustment *adj = gtk_range_get_adjustment (GTK_RANGE (range));
           gdouble new_value;


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