Commit a5c394e9 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Matthias Clasen

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
parent f34a2368
...@@ -1407,6 +1407,7 @@ popup_grab_on_window (GdkWindow *window, ...@@ -1407,6 +1407,7 @@ popup_grab_on_window (GdkWindow *window,
if (pointer && if (pointer &&
gdk_device_grab (pointer, window, gdk_device_grab (pointer, window,
GDK_OWNERSHIP_WINDOW, TRUE, GDK_OWNERSHIP_WINDOW, TRUE,
GDK_SMOOTH_SCROLL_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
GDK_POINTER_MOTION_MASK, GDK_POINTER_MOTION_MASK,
...@@ -3845,6 +3846,9 @@ gtk_menu_scroll (GtkWidget *widget, ...@@ -3845,6 +3846,9 @@ gtk_menu_scroll (GtkWidget *widget,
case GDK_SCROLL_UP: case GDK_SCROLL_UP:
gtk_menu_scroll_by (menu, - MENU_SCROLL_STEP2); gtk_menu_scroll_by (menu, - MENU_SCROLL_STEP2);
break; break;
case GDK_SCROLL_SMOOTH:
gtk_menu_scroll_by (menu, event->delta_y);
break;
} }
return TRUE; return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment