TDKCandidates // Refine OS version check methods.

This commit is contained in:
ShikiSuen 2023-06-05 20:33:27 +08:00
parent 6fb1d9ee1d
commit 31e2b017ae
1 changed files with 5 additions and 10 deletions

View File

@ -108,18 +108,13 @@ public class CtlCandidateTDK: CtlCandidate, NSWindowDelegate {
DispatchQueue.main.async { [self] in DispatchQueue.main.async { [self] in
window.isOpaque = false window.isOpaque = false
window.backgroundColor = .clear window.backgroundColor = .clear
viewCheck: if #available(macOS 10.15, *) { viewCheck: do {
if useCocoa { viewCheckCatalina: if #available(macOS 10.15, *) {
// if !NSApplication.isAppleSilicon { if useCocoa { break viewCheckCatalina }
// updateNSWindowLegacy(window)
// return
// }
Self.currentView = theViewCocoa
break viewCheck
}
Self.thePool.update() Self.thePool.update()
Self.currentView = NSHostingView(rootView: theView) Self.currentView = NSHostingView(rootView: theView)
} else { break viewCheck
}
Self.currentView = theViewCocoa Self.currentView = theViewCocoa
} }
window.contentView = Self.currentView window.contentView = Self.currentView