diff --git a/src/st/st-scroll-view.c b/src/st/st-scroll-view.c index 50de48194..9f667e545 100644 --- a/src/st/st-scroll-view.c +++ b/src/st/st-scroll-view.c @@ -764,6 +764,7 @@ st_scroll_view_scroll_event (ClutterActor *self, { StScrollViewPrivate *priv = ST_SCROLL_VIEW (self)->priv; ClutterTextDirection direction; + ClutterScrollDirection scroll_direction; /* don't handle scroll events if requested not to */ if (!priv->mouse_scroll) @@ -773,8 +774,9 @@ st_scroll_view_scroll_event (ClutterActor *self, return TRUE; direction = clutter_actor_get_text_direction (self); + scroll_direction = clutter_event_get_scroll_direction ((ClutterEvent *) event); - switch (event->direction) + switch (scroll_direction) { case CLUTTER_SCROLL_SMOOTH: { @@ -790,7 +792,7 @@ st_scroll_view_scroll_event (ClutterActor *self, break; case CLUTTER_SCROLL_UP: case CLUTTER_SCROLL_DOWN: - adjust_with_direction (priv->vadjustment, event->direction); + adjust_with_direction (priv->vadjustment, direction); break; case CLUTTER_SCROLL_LEFT: case CLUTTER_SCROLL_RIGHT: @@ -798,13 +800,13 @@ st_scroll_view_scroll_event (ClutterActor *self, { ClutterScrollDirection dir; - dir = event->direction == CLUTTER_SCROLL_LEFT ? CLUTTER_SCROLL_RIGHT + dir = scroll_direction == CLUTTER_SCROLL_LEFT ? CLUTTER_SCROLL_RIGHT : CLUTTER_SCROLL_LEFT; adjust_with_direction (priv->hadjustment, dir); } else { - adjust_with_direction (priv->hadjustment, event->direction); + adjust_with_direction (priv->hadjustment, direction); } break; default: