workspacesView: Treat 'gesture-cancel' the same as 'gesture-end'

When a swipe scroll completes, we scroll the active workspace into
view. This works fine if the gesture is completed properly by
emitting 'gesture-end', but not when Clutter considers the gesture
cancelled - in that case, the view remains stuck in an intermediate
position. To fix, treat 'gesture-cancel' the same as 'gesture-end'.

https://bugzilla.gnome.org/show_bug.cgi?id=689394
This commit is contained in:
Florian Müllner 2013-02-20 08:23:51 +01:00
parent b4678a1cee
commit 420f0109ee

View File

@ -442,6 +442,11 @@ const WorkspacesDisplay = new Lang.Class({
this._workspacesViews[i].startSwipeScroll();
return true;
}));
panAction.connect('gesture-cancel', Lang.bind(this, function() {
clickAction.release();
for (let i = 0; i < this._workspacesViews.length; i++)
this._workspacesViews[i].endSwipeScroll();
}));
panAction.connect('gesture-end', Lang.bind(this, function() {
clickAction.release();
for (let i = 0; i < this._workspacesViews.length; i++)