[gtk+] treeviewcolumn: Don't swallow motion/crossing events



commit f7d02bfb61fe17636dc72848a47b241b0c3e668b
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Oct 6 18:06:56 2017 +0200

    treeviewcolumn: Don't swallow motion/crossing events
    
    If the column is not clickable, it may make some sense to stop
    event propagation here for button events. However motion events
    should be left alone.
    
    Fixes treeview column resize pointer cursors, since that's
    implemented up the bubbling phase in the treeview.

 gtk/gtktreeviewcolumn.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 60ddef0..eea86e7 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -1056,16 +1056,14 @@ gtk_tree_view_column_button_event (GtkWidget *widget,
       switch (event_type)
        {
        case GDK_BUTTON_PRESS:
-       case GDK_MOTION_NOTIFY:
        case GDK_BUTTON_RELEASE:
-       case GDK_ENTER_NOTIFY:
-       case GDK_LEAVE_NOTIFY:
-         return TRUE;
+          return GDK_EVENT_STOP;
        default:
-         return FALSE;
+          return GDK_EVENT_PROPAGATE;
        }
     }
-  return FALSE;
+
+  return GDK_EVENT_PROPAGATE;
 }
 
 


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