From 2173b6d483bb8f44e6003e393bba7080981e84a7 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 14 Mar 2016 19:13:05 +0100 Subject: [PATCH] GtkScrolledWindow: Check proximity on both indicators on grab-end leave events The implicit grab may be finished so the pointer lies on top of the other scrollbar, in this case one scrollbar should lose the hovering state, and the other should gain it. So we must check for proximity in both indicators. --- gtk/gtkscrolledwindow.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index f9fa7ea011..2d29d6509e 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -1376,10 +1376,8 @@ captured_event_cb (GtkWidget *widget, else if (event->type == GDK_LEAVE_NOTIFY && on_scrollbar && event->crossing.mode == GDK_CROSSING_UNGRAB) { - if (event_widget == priv->hindicator.scrollbar) - check_update_scrollbar_proximity (sw, &priv->hindicator, event); - else if (event_widget == priv->vindicator.scrollbar) - check_update_scrollbar_proximity (sw, &priv->vindicator, event); + check_update_scrollbar_proximity (sw, &priv->vindicator, event); + check_update_scrollbar_proximity (sw, &priv->hindicator, event); } return GDK_EVENT_PROPAGATE;