Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions cmd/scratch.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,25 @@ func showScratchpad() {
// Return the last window in the list, if we have any.
if len(workspaceWindows) > 0 {
window := workspaceWindows[len(workspaceWindows)-1]
action := actions.MoveWindowToWorkspace{
AName: actions.AName{Name: "MoveWindowToWorkspace"},
WindowID: window.ID,
Reference: actions.WorkspaceReferenceArg{
ID: focusedWorkspace.ID,
actionList := []actions.Action{
actions.MoveWindowToWorkspace{
AName: actions.AName{Name: "MoveWindowToWorkspace"},
WindowID: window.ID,
Reference: actions.WorkspaceReferenceArg{
ID: focusedWorkspace.ID,
},
Focus: true,
},
// Manually focus the window, since the `Focus: true` does nothing in the above action.
actions.FocusWindow{
AName: actions.AName{Name: "FocusWindow"},
ID: window.ID,
},
Focus: true,
}
connection.PerformAction(action)

for _, action := range actionList {
connection.PerformAction(action)
}
}
}

Expand Down