From 1f03c94d311edffb77d9f87b8fbd6e26eb04e148 Mon Sep 17 00:00:00 2001 From: Xiang Fan Date: Sat, 16 Mar 2019 18:53:52 +0800 Subject: [PATCH] windowManager: Don't animate touch/touchpad gesture in overview The window group is hidden while in overview, so the stick-to-content animation isn't visible either. Worse, the gestures messes up the position of window actors in that case. Fix that by skipping the (invisible) animations in the overview. https://gitlab.gnome.org/GNOME/gnome-shell/issues/644 --- js/ui/windowManager.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index adfee93a9..e11b09cee 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -1049,6 +1049,10 @@ var WindowManager = new Lang.Class({ let workspaceManager = global.workspace_manager; let activeWorkspace = workspaceManager.get_active_workspace(); + // If overview is visible, we would mess up the positioning of windows. + if (Main.overview.visible) + return; + if (!this._switchData) this._prepareWorkspaceSwitch(activeWorkspace.index(), -1); @@ -1088,7 +1092,8 @@ var WindowManager = new Lang.Class({ if (newWs == activeWorkspace) { this._switchWorkspaceCancel(); } else { - this._switchData.gestureActivated = true; + if (this._switchData) + this._switchData.gestureActivated = true; this.actionMoveWorkspace(newWs); } },