summaryrefslogtreecommitdiff
path: root/gdk/gdkevents.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2012-01-23 23:51:24 +0100
committerMatthias Clasen <mclasen@redhat.com>2012-03-01 16:28:57 -0500
commitf47e470e586bd2d43b3509ff069ecd09716beaa8 (patch)
treea5f076b24557e7e1b4a25162f205735e1863a1fc /gdk/gdkevents.c
parent0efbbc6435a5be7790bfc170e250832507298630 (diff)
downloadgtk+-f47e470e586bd2d43b3509ff069ecd09716beaa8.tar.gz
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
Diffstat (limited to 'gdk/gdkevents.c')
-rw-r--r--gdk/gdkevents.c5
1 files changed, 4 insertions, 1 deletions
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;