From f47e470e586bd2d43b3509ff069ecd09716beaa8 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 23 Jan 2012 23:51:24 +0100 Subject: [PATCH] gdk: deal with GDK_SMOOTH_SCROLL events as not having a direction gdk_event_get_scroll_direction() will return FALSE on these, so gdk_event_get_scroll_deltas() has to be used to retrieve dx/dy --- gdk/gdkevents.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 7abd956c2f..db37512bc6 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -1196,7 +1196,10 @@ gdk_event_get_scroll_direction (const GdkEvent *event, switch (event->type) { case GDK_SCROLL: - dir = event->scroll.direction; + if (event->scroll.direction == GDK_SCROLL_SMOOTH) + fetched = FALSE; + else + dir = event->scroll.direction; break; default: fetched = FALSE;