From ab3582be1cca307350389ca6bcb326b4fce35d73 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 19 Mar 2012 12:19:26 +0000 Subject: [PATCH] gdk: Relay scroll delta from GDK --- clutter/gdk/clutter-event-gdk.c | 3 +++ clutter/gdk/clutter-stage-gdk.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/clutter/gdk/clutter-event-gdk.c b/clutter/gdk/clutter-event-gdk.c index 4e0e22fb8..3276996b7 100644 --- a/clutter/gdk/clutter-event-gdk.c +++ b/clutter/gdk/clutter-event-gdk.c @@ -258,6 +258,9 @@ clutter_gdk_handle_event (GdkEvent *gdk_event) event->scroll.direction = gdk_event->scroll.direction; clutter_event_set_device (event, device); clutter_event_set_source_device (event, source_device); + clutter_event_set_scroll_delta (event, + gdk_event->scroll.delta_x, + gdk_event->scroll.delta_y); break; case GDK_WINDOW_STATE: diff --git a/clutter/gdk/clutter-stage-gdk.h b/clutter/gdk/clutter-stage-gdk.h index 8c4cb207d..40049552d 100644 --- a/clutter/gdk/clutter-stage-gdk.h +++ b/clutter/gdk/clutter-stage-gdk.h @@ -68,7 +68,8 @@ struct _ClutterStageGdkClass GDK_KEY_RELEASE_MASK | \ GDK_BUTTON_PRESS_MASK | \ GDK_BUTTON_RELEASE_MASK | \ - GDK_POINTER_MOTION_MASK) + GDK_POINTER_MOTION_MASK | \ + GDK_SCROLL_MASK) GType _clutter_stage_gdk_get_type (void) G_GNUC_CONST;