fix: better handle screen or space changes (closes #1254, closes #2983)

This commit is contained in:
lwouis committed 2024-11-10 18:57:07 +01:00
1 parent bc2fe382a9
commit 3c4aaf5bba
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -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() {
+2 -1
View File
@@ -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)