From bf2de90d0df07079c493294d6dfd3fa2abe94744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Br=C3=B8nner?= Date: Wed, 29 Jan 2020 21:06:22 +0100 Subject: [PATCH] Always run a complete switch workspace handler on navigation end (inPreview) Needed to ensure all windows belong to the space's workspace. Especially this case: - Start navigating (from A) to the previous workspace (B). - Drag and drop a window (X) from B to A - Navigate back to A and end navigation. X still belongs to B unless the full event handler run. ref commit: Ensure all windows in the space belong to the workspace before completing workspace switch --- navigator.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/navigator.js b/navigator.js index d38da09..d9c9fa5 100644 --- a/navigator.js +++ b/navigator.js @@ -287,7 +287,10 @@ var Navigator = class Navigator { // Animate the selected space into full view - normally this // happens on workspace switch, but activating the same workspace // again doesn't trigger a switch signal - force && Tiling.spaces.animateToSpace(this.space); + if (force) { + const workspaceId = this.space.workspace.index(); + Tiling.spaces.switchWorkspace(null, workspaceId, workspaceId); + } } else { if (Tiling.inGrab && Tiling.inGrab.window) { this.space.workspace.activate_with_focus(Tiling.inGrab.window, global.get_current_time());