diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-04-06 09:16:03 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-04-06 19:37:14 -0400 |
commit | cfb5f160f2d024dc118484bea5e1415f6de250c0 (patch) | |
tree | c78806c237fe0fdd42d45ada4d3b19994d39994b /gtk/gtkscrolledwindow.c | |
parent | cd499f0abcb1c071ae9ab2ca783e63063f669085 (diff) | |
download | gtk+-cfb5f160f2d024dc118484bea5e1415f6de250c0.tar.gz |
Make indicators pop out when needed
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
Diffstat (limited to 'gtk/gtkscrolledwindow.c')
-rw-r--r-- | gtk/gtkscrolledwindow.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 2845629a21..4016122185 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -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); |