From: Matthias Clasen Date: Mon, 6 Apr 2015 13:16:03 +0000 (-0400) Subject: Make indicators pop out when needed X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~24^2~9929 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cfb5f160f2d024dc118484bea5e1415f6de250c0;p=gtk4.git 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 --- 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);