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
This commit is contained in:
Ole Jørgen Brønner 2020-01-29 21:06:22 +01:00 committed by Tor Hedin Brønner
parent ab33b9a268
commit bf2de90d0d

View File

@ -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());