From a5c394e901dda5f2e064b12008009486ad89e12a Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 23 Feb 2012 14:14:33 +0100 Subject: [PATCH] menu: Handle smooth scrolling event->scroll.delta_y will be used to scroll the menu contents, GDK_SMOOTH_SCROLL_MASK has been set as well --- gtk/gtkmenu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 8ecf9bf05d..b7f95e3361 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -1407,6 +1407,7 @@ popup_grab_on_window (GdkWindow *window, if (pointer && gdk_device_grab (pointer, window, GDK_OWNERSHIP_WINDOW, TRUE, + GDK_SMOOTH_SCROLL_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK, @@ -3845,6 +3846,9 @@ gtk_menu_scroll (GtkWidget *widget, case GDK_SCROLL_UP: gtk_menu_scroll_by (menu, - MENU_SCROLL_STEP2); break; + case GDK_SCROLL_SMOOTH: + gtk_menu_scroll_by (menu, event->delta_y); + break; } return TRUE;