@@ -41,27 +41,24 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
41
41
}
42
42
}
43
43
44
- // On macOS 15, the windows handle their own closure. If on macOS 14,
45
- // close them here.
46
- //
47
- // NOTE: The windows might not close when running from Xcode, but it
48
- // does work when running standalone.
49
- if #unavailable( macOS 15 . 0 ) {
44
+ // Temporary hack to make sure the window opens on Sequoia is to
45
+ // let them open, wait a bit, then close them.
46
+ DispatchQueue . main. asyncAfter ( deadline: . now( ) + 0.5 ) {
50
47
appState. settingsWindow? . close ( )
51
48
appState. permissionsWindow? . close ( )
52
- }
53
49
54
- if !appState. isPreview {
55
- // If we have the required permissions, set up the shared app state.
56
- // Otherwise, open the permissions window.
57
- if appState. permissionsManager. hasPermission {
58
- appState. performSetup ( )
59
- } else if let permissionsWindow = appState. permissionsWindow {
60
- appState. activate ( withPolicy: . regular)
61
- permissionsWindow. center ( )
62
- permissionsWindow. makeKeyAndOrderFront ( nil )
63
- } else {
64
- Logger . appDelegate. error ( " Failed to open permissions window " )
50
+ if !appState. isPreview {
51
+ // If we have the required permissions, set up the shared app state.
52
+ // Otherwise, open the permissions window.
53
+ if appState. permissionsManager. hasPermission {
54
+ appState. performSetup ( )
55
+ } else if let permissionsWindow = appState. permissionsWindow {
56
+ appState. activate ( withPolicy: . regular)
57
+ permissionsWindow. center ( )
58
+ permissionsWindow. makeKeyAndOrderFront ( nil )
59
+ } else {
60
+ Logger . appDelegate. error ( " Failed to open permissions window " )
61
+ }
65
62
}
66
63
}
67
64
}
0 commit comments