[gtk+/smooth-scrolling-for-3.4: 3/20] 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-for-3.4: 3/20] gdk: deal with GDK_SMOOTH_SCROLL events as not having a direction
- Date: Thu, 23 Feb 2012 13:49:27 +0000 (UTC)
commit b19508c453d3e746082fb7cb97662e0c735e3e11
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 9c70d51..2cede9b 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -1169,7 +1169,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]