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
This commit is contained in:
Stefan Sauer 2014-05-25 21:35:14 +02:00 committed by Matthias Clasen
parent c389fc64f7
commit f0478c3dfd

View File

@ -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;