From 420f0109ee0de80982702b1ee397d4c0c7ad73df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 20 Feb 2013 08:23:51 +0100 Subject: [PATCH] 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 --- js/ui/workspacesView.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 8bb589f42..605f8a171 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -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++)