wayland: add gdk_event_is_scroll_stop_event()

And use it to handle kinetic scrolling in the GtkScrolledWindow.

However, dropping the delta check causes the X11-based kinetic
scroll to break since we don't have the stop event here. Correct handling of
xf86-input-libinput-based scroll events is still being discussed.

https://bugzilla.gnome.org/show_bug.cgi?id=756729
This commit is contained in:
Peter Hutterer
2015-10-21 10:14:40 +10:00
committed by Carlos Garnacho
parent 3fca36169a
commit 48aa1bb08f
6 changed files with 49 additions and 3 deletions

View File

@ -3321,7 +3321,7 @@ gtk_scrolled_window_scroll_event (GtkWidget *widget,
* after scrolling finished, start kinetic scrolling when this
* happens.
*/
if (delta_y == 0 && delta_x == 0)
if (gdk_event_is_scroll_stop_event ((GdkEvent *) event))
{
handled = TRUE;
start_deceleration = TRUE;