Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kinetic-scroll-view: don't propagate press events that stop a deceleration #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion mx/mx-kinetic-scroll-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,7 @@ press_event (MxKineticScrollView *scroll,
ClutterActor *actor = (ClutterActor *) scroll;
ClutterActor *stage = clutter_actor_get_stage (actor);
MxKineticScrollViewMotion *motion;
gboolean timeline_stopped = FALSE;

/* Reset automatic-scroll setting */
priv->in_automatic_scroll = MX_AUTOMATIC_SCROLL_NONE;
Expand All @@ -1530,6 +1531,7 @@ press_event (MxKineticScrollView *scroll,
clutter_timeline_stop (priv->deceleration_timeline);
g_object_unref (priv->deceleration_timeline);
priv->deceleration_timeline = NULL;
timeline_stopped = TRUE;

clamp_adjustments (scroll, priv->clamp_duration, priv->hmoving,
priv->vmoving);
Expand Down Expand Up @@ -1585,7 +1587,7 @@ press_event (MxKineticScrollView *scroll,
priv->in_drag = FALSE;
}

return FALSE;
return timeline_stopped;
}

static gboolean
Expand Down