From 8223226a15994c5cb861b1577d1c7d21034d3245 Mon Sep 17 00:00:00 2001 From: Hossin Asaadi Date: Tue, 27 Aug 2024 16:12:29 +0400 Subject: [PATCH] Improve forceClose --- Sources/Lowtech/OSDWindow.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Lowtech/OSDWindow.swift b/Sources/Lowtech/OSDWindow.swift index 49c2b64..505e425 100644 --- a/Sources/Lowtech/OSDWindow.swift +++ b/Sources/Lowtech/OSDWindow.swift @@ -388,6 +388,8 @@ open class LowtechWindow: NSWindow, NSWindowDelegate { wc.close() wc.window = nil close() + // assign empty view + contentViewController?.view = NSView() } public func withAnim(_ easing: CAMediaTimingFunction = .easeOutExpo, duration: Double = 0.3, animate: Bool = true, onEnd: (() -> Void)? = nil, _ action: (LowtechWindow) -> Void) {