From d19f8f7f9d3204d37fd1c47f9b51f682238a8423 Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Mon, 17 Aug 2026 10:55:35 -0400 Subject: [PATCH] macos: remove unused hosting window helper Remove the unused SwiftUI environment key intended to expose a hosting window. Nothing sets or reads the value. --- macos/Sources/Helpers/HostingWindow.swift | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 macos/Sources/Helpers/HostingWindow.swift diff --git a/macos/Sources/Helpers/HostingWindow.swift b/macos/Sources/Helpers/HostingWindow.swift deleted file mode 100644 index a23687439..000000000 --- a/macos/Sources/Helpers/HostingWindow.swift +++ /dev/null @@ -1,14 +0,0 @@ -import SwiftUI - -struct HostingWindowKey: EnvironmentKey { - typealias Value = () -> NSWindow? // needed for weak link - static let defaultValue: Self.Value = { nil } -} - -extension EnvironmentValues { - /// This can be used to set the hosting NSWindow to a NSHostingView - var hostingWindow: HostingWindowKey.Value { - get { return self[HostingWindowKey.self] } - set { self[HostingWindowKey.self] = newValue } - } -}