GtkScrolledWindow: Don't handle key event when can't scroll

Don't return that a key event was handled when the corresponding
scrollbar can not scroll.

https://bugzilla.gnome.org/show_bug.cgi?id=753256
This commit is contained in:
Marek Kasik 2015-08-05 11:14:39 +02:00
parent 01371085ee
commit 359534ee59

View File

@ -2463,9 +2463,19 @@ gtk_scrolled_window_scroll_child (GtkScrolledWindow *scrolled_window,
} }
if (horizontal) if (horizontal)
{
if (may_hscroll (scrolled_window))
adjustment = gtk_range_get_adjustment (GTK_RANGE (priv->hscrollbar)); adjustment = gtk_range_get_adjustment (GTK_RANGE (priv->hscrollbar));
else else
return FALSE;
}
else
{
if (may_vscroll (scrolled_window))
adjustment = gtk_range_get_adjustment (GTK_RANGE (priv->vscrollbar)); adjustment = gtk_range_get_adjustment (GTK_RANGE (priv->vscrollbar));
else
return FALSE;
}
if (adjustment) if (adjustment)
{ {