[gtk+/smooth-scrolling-for-3.4: 16/16] viewport: set GDK_SMOOTH_SCROLL_MASK



commit a2fe6b9c39f3912c6adad62e72131286dcb46754
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Jan 24 12:18:45 2012 +0100

    viewport: set GDK_SMOOTH_SCROLL_MASK
    
    This is so smooth scroll events are send/handled by the
    parent GtkScrolledWindow if any.

 gtk/gtkviewport.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 2b0e285..3c2f3fc 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -682,9 +682,7 @@ gtk_viewport_realize (GtkWidget *widget)
   attributes.visual = gtk_widget_get_visual (widget);
 
   event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
-  /* We select on button_press_mask so that button 4-5 scrolls are trapped.
-   */
-  attributes.event_mask = event_mask | GDK_BUTTON_PRESS_MASK;
+  attributes.event_mask = event_mask | GDK_SCROLL_MASK | GDK_SMOOTH_SCROLL_MASK;
 
   attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
 



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