Skip to content

Commit 2a6e917

Browse files
committed
move-workspace-to-monitor: Fetch previous workspace before moving
Otherwise the previous workspace will be the workspace that just moved, causing the "is not visible check" in `getStubWorkspace` to fail. As a result, the moving workspace is always replaced by the first non-empty workspace on that monitor, which is not intuitive.
1 parent 18545c2 commit 2a6e917

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/AppBundle/command/impl/MoveWorkspaceToMonitorCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ struct MoveWorkspaceToMonitorCommand: Command {
1515
if targetMonitor.monitorId == prevMonitor.monitorId {
1616
return true
1717
}
18+
let stubWorkspace = getStubWorkspace(for: prevMonitor)
1819
if targetMonitor.setActiveWorkspace(focusedWorkspace) {
19-
let stubWorkspace = getStubWorkspace(for: prevMonitor)
2020
check(
2121
prevMonitor.setActiveWorkspace(stubWorkspace),
2222
"getStubWorkspace generated incompatible stub workspace (\(stubWorkspace)) for the monitor (\(prevMonitor)",

0 commit comments

Comments
 (0)