We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c06dfa commit b1961faCopy full SHA for b1961fa
1 file changed
maclib/tray.swift
@@ -560,9 +560,13 @@ public func tray_set_icons_for_appearance(
560
/// switching back to the Space where it was originally created.
561
@_cdecl("tray_set_windows_move_to_active_space")
562
public func tray_set_windows_move_to_active_space() {
563
- for window in NSApp.windows {
564
- window.collectionBehavior.insert(.moveToActiveSpace)
+ let doWork = {
+ for window in NSApp.windows {
565
+ window.collectionBehavior.insert(.moveToActiveSpace)
566
+ }
567
}
568
+ if Thread.isMainThread { doWork() }
569
+ else { DispatchQueue.main.sync { doWork() } }
570
571
572
// MARK: - Dock visibility
0 commit comments