[gtk+] GtkScrolledWindow: Check proximity on both indicators on grab-end leave events



commit 2173b6d483bb8f44e6003e393bba7080981e84a7
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Mar 14 19:13:05 2016 +0100

    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 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index f9fa7ea..2d29d65 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]