swipe-action: Fix typo

X coords are meant to compare with distance_x.
This commit is contained in:
Carlos Garnacho 2015-05-22 18:40:34 +02:00
parent a4962c0336
commit fbe2c74e19

View File

@ -157,7 +157,7 @@ gesture_end (ClutterGestureAction *action,
last_event = clutter_gesture_action_get_last_event (action, 0); last_event = clutter_gesture_action_get_last_event (action, 0);
clutter_event_get_coords (last_event, &release_x, &release_y); clutter_event_get_coords (last_event, &release_x, &release_y);
if (release_x - press_x > priv->distance_y) if (release_x - press_x > priv->distance_x)
direction |= CLUTTER_SWIPE_DIRECTION_RIGHT; direction |= CLUTTER_SWIPE_DIRECTION_RIGHT;
else if (press_x - release_x > priv->distance_x) else if (press_x - release_x > priv->distance_x)
direction |= CLUTTER_SWIPE_DIRECTION_LEFT; direction |= CLUTTER_SWIPE_DIRECTION_LEFT;