summaryrefslogtreecommitdiff
path: root/gtk/gtkviewport.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2012-01-24 12:18:45 +0100
committerMatthias Clasen <mclasen@redhat.com>2012-03-01 16:28:59 -0500
commitf34a23681460515db0c338b2b719e700c4440e59 (patch)
tree91df4226cc4c534019738b44e2dff885fd609168 /gtk/gtkviewport.c
parentfaa1d9b8f8ff132aab69ba12c9b6081eb3b5d1ec (diff)
downloadgtk+-f34a23681460515db0c338b2b719e700c4440e59.tar.gz
viewport: set GDK_SMOOTH_SCROLL_MASK
This is so smooth scroll events are send/handled by the parent GtkScrolledWindow if any.
Diffstat (limited to 'gtk/gtkviewport.c')
-rw-r--r--gtk/gtkviewport.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index e20ccf7a92..eea91ad9ae 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -680,9 +680,8 @@ 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 | GDK_TOUCH_MASK;
+
+ attributes.event_mask = event_mask | GDK_SCROLL_MASK | GDK_TOUCH_MASK | GDK_SMOOTH_SCROLL_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;