PCB // Auto-close out-of-date window instances.
This commit is contained in:
parent
ff2df510d7
commit
4e7c4133ab
|
@ -10,6 +10,12 @@ import AppKit
|
|||
import Shared
|
||||
|
||||
public class PopupCompositionBuffer: NSWindowController {
|
||||
private static var currentWindow: NSWindow? {
|
||||
willSet {
|
||||
currentWindow?.orderOut(nil)
|
||||
}
|
||||
}
|
||||
|
||||
public var isTypingDirectionVertical = false {
|
||||
didSet {
|
||||
if #unavailable(macOS 10.14) {
|
||||
|
@ -47,6 +53,7 @@ public class PopupCompositionBuffer: NSWindowController {
|
|||
messageTextField.font = .systemFont(ofSize: 18)
|
||||
panel.contentView?.addSubview(messageTextField)
|
||||
panel.contentView?.wantsLayer = true
|
||||
Self.currentWindow = panel
|
||||
super.init(window: panel)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue