diff --git a/macos/Ghostty.xcodeproj/project.pbxproj b/macos/Ghostty.xcodeproj/project.pbxproj index 8871343c3..9ab2cac74 100644 --- a/macos/Ghostty.xcodeproj/project.pbxproj +++ b/macos/Ghostty.xcodeproj/project.pbxproj @@ -231,6 +231,7 @@ Helpers/LastWindowPosition.swift, Helpers/MetalView.swift, Helpers/NonDraggableHostingView.swift, + Helpers/ObjCExceptionCatcher.m, Helpers/PermissionRequest.swift, Helpers/Private/CGS.swift, Helpers/Private/Dock.swift, diff --git a/macos/Sources/Helpers/ObjCExceptionCatcher.m b/macos/Sources/Helpers/ObjCExceptionCatcher.m index 0a2e04d52..16db75ddc 100644 --- a/macos/Sources/Helpers/ObjCExceptionCatcher.m +++ b/macos/Sources/Helpers/ObjCExceptionCatcher.m @@ -1,9 +1,6 @@ #import "ObjCExceptionCatcher.h" -#import -#if TARGET_OS_OSX #import -#endif BOOL GhosttyAddTabbedWindowSafely( id parent, @@ -11,7 +8,6 @@ BOOL GhosttyAddTabbedWindowSafely( NSInteger ordered, NSError * _Nullable * _Nullable error ) { -#if TARGET_OS_OSX // AppKit occasionally throws NSException while reparenting tabbed windows. // We must catch it in Objective-C; letting this cross into Swift is unsafe. @try { @@ -30,14 +26,4 @@ BOOL GhosttyAddTabbedWindowSafely( return NO; } -#else - if (error != NULL) { - *error = [NSError errorWithDomain:@"Ghostty.ObjCException" - code:2 - userInfo:@{ - NSLocalizedDescriptionKey: @"GhosttyAddTabbedWindowSafely is unavailable on this platform.", - }]; - } - return NO; -#endif }