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
window.isOpaque = false
window.backgroundColor = .clear
viewCheck: if #available(macOS 10.15, *) {
if useCocoa {
// if !NSApplication.isAppleSilicon {
// updateNSWindowLegacy(window)
// return
// }
Self.currentView = theViewCocoa
break viewCheck
}
viewCheck: do {
viewCheckCatalina: if #available(macOS 10.15, *) {
if useCocoa { break viewCheckCatalina }
Self.thePool.update()
Self.currentView = NSHostingView(rootView: theView)
} else {
break viewCheck
}
Self.currentView = theViewCocoa
}
window.contentView = Self.currentView