diff --git a/src/logic/Spaces.swift b/src/logic/Spaces.swift index c0493cf7..a2e1defd 100644 --- a/src/logic/Spaces.swift +++ b/src/logic/Spaces.swift @@ -32,7 +32,7 @@ class Spaces { static func refreshSpacesAndWindows() { Spaces.refresh() - Windows.list.forEachAsync { $0.updatesWindowSpace() } + App.app.refreshOpenUi(Windows.list) } private static func updateCurrentSpace() { diff --git a/src/ui/App.swift b/src/ui/App.swift index c3aa169f..8236eee4 100644 --- a/src/ui/App.swift +++ b/src/ui/App.swift @@ -279,7 +279,8 @@ class App: AppCenterApplication, NSApplicationDelegate { // TODO: find a way to update space info when spaces are changed, instead of on every trigger // workaround: when Preferences > Mission Control > "Displays have separate Spaces" is unchecked, // switching between displays doesn't trigger .activeSpaceDidChangeNotification; we get the latest manually - Spaces.refreshSpacesAndWindows() + Spaces.refresh() + Windows.list.forEachAsync { $0.updatesWindowSpace() } let screen = NSScreen.preferred() self.shortcutIndex = shortcutIndex Windows.refreshWhichWindowsToShowTheUser(screen)