[gtk+] GtkTreeView: stop ignoring crossing events from grabs



commit 827e5cb87b6ce87a7fc6ea30f7595543a280410b
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Wed Mar 12 19:27:42 2014 -0400

    GtkTreeView: stop ignoring crossing events from grabs
    
    Stop ignoring various crossing events from grabs:
    
    Enter events with type GRAB/GTK_GRAB/GTK_UNGRAB/STATE_CHANGED:
      Ignoring these events was added as a workaround for synthesized
      events not having the right coordinates (see bug 555109) but
      now they do have the right coordinates. (see bug 704456)
    
    Leave events with types types GTK_GRAB/GTK_UNGRAB:
      Ignoring these events was added because since we were ignoring
      the enter events as above, ignoring the leave events meant we
      could lose the prelighted row in a grab-triggered leave/enter
      pair. (See bug 653676. It's also now impossible to
      reproduce the leave events that were reported in that bug as causing
      problems.)
    
    Leave events of type GRAB.
      Ignoring these events was added without a ChangeLog entry in 2001,
      possibly to keep the prelight from flashing when activating menus.
      But ignoring these events could lead to stuck prelighting, and we don't
      do it for any other widgets.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726209
    
    The bug this patch is fixing is that currently if you have a GtkPopover in
    clicking off the popover to dismiss it on a GtkTreeView (which triggers
    a synthetic enter event on the GtkTreeView) will leave the GtkTreeView
    in a confused state until the user moves the mouse again.

 gtk/gtktreeview.c |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index c882495..bf2c1b1 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -6017,12 +6017,6 @@ gtk_tree_view_enter_notify (GtkWidget        *widget,
   if (tree_view->priv->tree == NULL)
     return FALSE;
 
-  if (event->mode == GDK_CROSSING_GRAB ||
-      event->mode == GDK_CROSSING_GTK_GRAB ||
-      event->mode == GDK_CROSSING_GTK_UNGRAB ||
-      event->mode == GDK_CROSSING_STATE_CHANGED)
-    return TRUE;
-
   /* find the node internally */
   new_y = TREE_WINDOW_Y_TO_RBTREE_Y(tree_view, event->y);
   if (new_y < 0)
@@ -6045,11 +6039,6 @@ gtk_tree_view_leave_notify (GtkWidget        *widget,
 {
   GtkTreeView *tree_view;
 
-  if (event->mode == GDK_CROSSING_GRAB ||
-      event->mode == GDK_CROSSING_GTK_GRAB ||
-      event->mode == GDK_CROSSING_GTK_UNGRAB)
-    return TRUE;
-
   tree_view = GTK_TREE_VIEW (widget);
 
   if (tree_view->priv->prelight_node)


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