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:
parent
b4678a1cee
commit
420f0109ee
@ -442,6 +442,11 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
this._workspacesViews[i].startSwipeScroll();
|
this._workspacesViews[i].startSwipeScroll();
|
||||||
return true;
|
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() {
|
panAction.connect('gesture-end', Lang.bind(this, function() {
|
||||||
clickAction.release();
|
clickAction.release();
|
||||||
for (let i = 0; i < this._workspacesViews.length; i++)
|
for (let i = 0; i < this._workspacesViews.length; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user