diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2014-06-25 16:58:18 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2014-06-25 16:58:18 +0100 |
commit | 036c2b3764824a8980b1ae052df4becdb26d4bbb (patch) | |
tree | 1e2a0e3f655bffc01eec0e6f395c5be89501bfae | |
parent | 02590f08ac81a24c476fdf18d79ceffdfe7f1a34 (diff) | |
download | clutter-036c2b3764824a8980b1ae052df4becdb26d4bbb.tar.gz |
gesture-action: Use event type getter
Don't use direct struct access.
-rw-r--r-- | clutter/clutter-gesture-action.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/clutter/clutter-gesture-action.c b/clutter/clutter-gesture-action.c index 90c803226..78c72b8fd 100644 --- a/clutter/clutter-gesture-action.c +++ b/clutter/clutter-gesture-action.c @@ -352,8 +352,8 @@ begin_gesture (ClutterGestureAction *action, } static gboolean -stage_captured_event_cb (ClutterActor *stage, - ClutterEvent *event, +stage_captured_event_cb (ClutterActor *stage, + ClutterEvent *event, ClutterGestureAction *action) { ClutterGestureActionPrivate *priv = action->priv; @@ -362,10 +362,14 @@ stage_captured_event_cb (ClutterActor *stage, float threshold_x, threshold_y; gboolean return_value; GesturePoint *point; - - if (event->type != CLUTTER_TOUCH_CANCEL && - event->type != CLUTTER_TOUCH_UPDATE && event->type != CLUTTER_TOUCH_END && - event->type != CLUTTER_MOTION && event->type != CLUTTER_BUTTON_RELEASE) + ClutterEventType event_type; + + event_type = clutter_event_type (event); + if (event_type != CLUTTER_TOUCH_CANCEL && + event_type != CLUTTER_TOUCH_UPDATE && + event_type != CLUTTER_TOUCH_END && + event_type != CLUTTER_MOTION && + event_type != CLUTTER_BUTTON_RELEASE) return CLUTTER_EVENT_PROPAGATE; if ((point = gesture_find_point (action, event, &position)) == NULL) |