scrolledwindow: Only start fade animation on "visible" scrollbars

If a scrollbar is not shown (because of policies, or because it isn't
necessary), it doesn't make sense to start fade animations on its window
on captured motion events.
This commit is contained in:
Carlos Garnacho 2015-02-24 14:52:40 +01:00
parent b06908ad52
commit 0c903156ef

View File

@ -1087,8 +1087,10 @@ captured_event_cb (GtkWidget *widget,
if (event->type == GDK_MOTION_NOTIFY)
{
indicator_start_fade (&priv->hindicator, 1.0);
indicator_start_fade (&priv->vindicator, 1.0);
if (priv->hscrollbar_visible)
indicator_start_fade (&priv->hindicator, 1.0);
if (priv->vscrollbar_visible)
indicator_start_fade (&priv->vindicator, 1.0);
if ((event->motion.state &
(GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK)) != 0)