Skip to content

Commit

Permalink
Update Window.swift
Browse files Browse the repository at this point in the history
Moved from CGSAddWindowsToSpaces + CGSRemoveWindowsFromSpaces to CGSMoveWindowsToManagedSpace
ianyh#1192
  • Loading branch information
dzanotto committed Feb 23, 2022
1 parent 78bdccd commit 5a28840
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Amethyst/Model/Window.swift
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,9 @@ extension AXWindow: WindowType {
}

func move(toSpace spaceID: CGSSpaceID) {
let currentSpace = CGSGetActiveSpace(CGSMainConnectionID())
let ids = [cgID()]

CGSAddWindowsToSpaces(CGSMainConnectionID(), ids as CFArray, [spaceID] as CFArray)
CGSRemoveWindowsFromSpaces(CGSMainConnectionID(), ids as CFArray, [currentSpace] as CFArray)
CGSMoveWindowsToManagedSpace(CGSMainConnectionID(), ids as CFArray, spaceID)

if UserConfiguration.shared.followWindowsThrownBetweenSpaces() {
focus()
Expand Down

0 comments on commit 5a28840

Please sign in to comment.