[gtk+/smooth-scrolling-for-3.4: 17/20] menu: Handle smooth scrolling
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/smooth-scrolling-for-3.4: 17/20] menu: Handle smooth scrolling
- Date: Thu, 23 Feb 2012 13:50:37 +0000 (UTC)
commit b0ed73343b99d7cb26d65049ebf5f9b0c7a4513b
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Feb 23 14:14:33 2012 +0100
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 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 3e4e86b..60d3435 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -1398,6 +1398,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,
@@ -3836,6 +3837,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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]