[gtk+] gdk: deal with GDK_SMOOTH_SCROLL events as not having a direction
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: deal with GDK_SMOOTH_SCROLL events as not having a direction
- Date: Thu, 1 Mar 2012 21:33:00 +0000 (UTC)
commit f47e470e586bd2d43b3509ff069ecd09716beaa8
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 7abd956..db37512 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]