Make indicators pop out when needed
authorMatthias Clasen <mclasen@redhat.com>
Mon, 6 Apr 2015 13:16:03 +0000 (09:16 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 6 Apr 2015 23:37:14 +0000 (19:37 -0400)
When moving over a non-expanded indicator from the outside, we were
not expanding it, due to on_scrollbar being true. This can be seen
e.g. when moving from the content pane over to the sidebar indicator
in gtk3-demo. We must still ensure that the indicator is expanded
when receiving motion events over the indicator.

https://bugzilla.gnome.org/show_bug.cgi?id=747407

gtk/gtkscrolledwindow.c

index 2845629a212b6f2b66fda8afe0402da3ebd9033f..401612218511df2bbd9aaa3bbc5bcfa99b354008 100644 (file)
@@ -1107,15 +1107,16 @@ captured_event_cb (GtkWidget *widget,
   on_scrollbar = (event_widget == priv->hindicator.scrollbar ||
                   event_widget == priv->vindicator.scrollbar);
 
-  if (event->type == GDK_MOTION_NOTIFY && !on_scrollbar)
+  if (event->type == GDK_MOTION_NOTIFY)
     {
       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)
+      if (!on_scrollbar &&
+           (event->motion.state &
+            (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK)) != 0)
         {
           indicator_set_over (&priv->hindicator, FALSE);
           indicator_set_over (&priv->vindicator, FALSE);