[gtk+/smooth-scrolling: 3/16] gdk: deal with GDK_SMOOTH_SCROLL events as not having a direction
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/smooth-scrolling: 3/16] gdk: deal with GDK_SMOOTH_SCROLL events as not having a direction
- Date: Tue, 24 Jan 2012 11:26:14 +0000 (UTC)
commit 238f11a88bdf11a7874c406640fc8b48ca3a6fb9
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jan 23 23:51:24 2012 +0100
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 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 8eee7c6..9eaa682 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -1208,7 +1208,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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]